Skip to content

Commit 864d4b6

Browse files
authored
Shift bits before making value negative (#9255)
2 parents 994a9de + 78b0e06 commit 864d4b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libImaging/BcnDecode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ static void
603603
bc6_sign_extend(UINT16 *v, int prec) {
604604
int x = *v;
605605
if (x & (1 << (prec - 1))) {
606-
x |= -1 << prec;
606+
x |= -(1 << prec);
607607
}
608608
*v = (UINT16)x;
609609
}

0 commit comments

Comments
 (0)