Cast to UINT32 before shifting bits (#9347)

This commit is contained in:
Andrew Murray 2025-12-22 18:12:10 +11:00 committed by GitHub
parent 4cbef1667f
commit ca21683316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -663,7 +663,7 @@ half_to_float(UINT16 h) {
if (o.f >= m.f) {
o.u |= 255 << 23;
}
o.u |= (h & 0x8000) << 16;
o.u |= (UINT32)(h & 0x8000) << 16;
return o.f;
}