:: commit d4a67bf80ae7d81f5df1ee85fce62a414994833d

Mintsuki <mintsuki@protonmail.com> — 2026-05-06 03:05

parents: 2f3572c323

drivers/gop: Use unsigned shift in linear_masks_to_bpp

diff --git a/common/drivers/gop.c b/common/drivers/gop.c
index 9b4ba140..7c8ca619 100644
--- a/common/drivers/gop.c
+++ b/common/drivers/gop.c
@@ -14,7 +14,7 @@ static uint16_t linear_masks_to_bpp(uint32_t red_mask, uint32_t green_mask,
                                     uint32_t blue_mask, uint32_t alpha_mask) {
     uint32_t compound_mask = red_mask | green_mask | blue_mask | alpha_mask;
     uint16_t ret = 32;
-    while ((compound_mask & (1 << 31)) == 0) {
+    while ((compound_mask & (1U << 31)) == 0) {
         ret--;
         compound_mask <<= 1;
     }
tab: 248 wrap: offon