From ca21683316a96b348197a6f5ca97ea9c6c142bb0 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Mon, 22 Dec 2025 18:12:10 +1100 Subject: [PATCH] Cast to UINT32 before shifting bits (#9347) --- src/libImaging/BcnDecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libImaging/BcnDecode.c b/src/libImaging/BcnDecode.c index ac81ed6df..d99b0e28e 100644 --- a/src/libImaging/BcnDecode.c +++ b/src/libImaging/BcnDecode.c @@ -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; }