Skip to content

Commit ca21683

Browse files
authored
Cast to UINT32 before shifting bits (python-pillow#9347)
1 parent 4cbef16 commit ca21683

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
@@ -663,7 +663,7 @@ half_to_float(UINT16 h) {
663663
if (o.f >= m.f) {
664664
o.u |= 255 << 23;
665665
}
666-
o.u |= (h & 0x8000) << 16;
666+
o.u |= (UINT32)(h & 0x8000) << 16;
667667
return o.f;
668668
}
669669

0 commit comments

Comments
 (0)