Skip to content

Commit

Permalink
Fix PSD import on ARM. (AcademySoftwareFoundation#3589)
Browse files Browse the repository at this point in the history
The code assumes "char" is "signed char" (as on x86), but on ARM "char" is
"unsigned char".

Co-authored-by: Joachim Reichel <joachim.reichel@posteo.de>
  • Loading branch information
2 people authored and lgritz committed Oct 7, 2022
1 parent b9880b5 commit 59b5165
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/psd.imageio/psdinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,8 @@ PSDInput::decompress_packbits(const char* src, char* dst,
int length;

while (src_remaining > 0 && dst_remaining > 0) {
header = *src++;
header = *reinterpret_cast<const signed char*>(src);
src++;
src_remaining--;

if (header == 128)
Expand Down

0 comments on commit 59b5165

Please sign in to comment.