mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-10-22 11:44:32 +03:00
Shift bits before making value negative (#9255)
This commit is contained in:
commit
864d4b6e09
|
@ -603,7 +603,7 @@ static void
|
|||
bc6_sign_extend(UINT16 *v, int prec) {
|
||||
int x = *v;
|
||||
if (x & (1 << (prec - 1))) {
|
||||
x |= -1 << prec;
|
||||
x |= -(1 << prec);
|
||||
}
|
||||
*v = (UINT16)x;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user