:: commit 71a5cf86b1698ec745d5f358f62c89c70d5413e9

Mintsuki <mintsuki@protonmail.com> — 2025-12-25 19:20

parents: bcf6f17ba0

drivers/gop: Fix current_fallback incremented before use bug

diff --git a/common/drivers/gop.c b/common/drivers/gop.c
index 16fd7065..3973cc3c 100644
--- a/common/drivers/gop.c
+++ b/common/drivers/gop.c
@@ -312,11 +312,11 @@ fallback:
         }
 
         if (current_fallback < SIZEOF_ARRAY(fallback_resolutions)) {
-            current_fallback++;
-
             _target_width = fallback_resolutions[current_fallback].width;
             _target_height = fallback_resolutions[current_fallback].height;
             _target_bpp = fallback_resolutions[current_fallback].bpp;
+
+            current_fallback++;
             goto retry;
         }
 
tab: 248 wrap: offon