From c142191d9d563d0371071946c2b28da296107d7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Sun, 19 Jan 2025 23:28:45 -0500
Subject: [PATCH] Initialize off, then add an assert to suppress warning.

---
 src/conio/bitmap_con.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conio/bitmap_con.c b/src/conio/bitmap_con.c
index ce2602be7d..904c8ddcbd 100644
--- a/src/conio/bitmap_con.c
+++ b/src/conio/bitmap_con.c
@@ -1929,7 +1929,7 @@ int bitmap_setpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, uint32_
 	int cpy = sy % vstat.charheight;
 	bool xupdated = false;
 	bool yupdated = false;
-	int off;
+	int off = INT_MIN;
 	int crows = vstat.rows * vstat.charheight;
 	int ccols = vstat.cols * vstat.charwidth;
 	for (y = sy; y <= ey; y++) {
@@ -1962,6 +1962,7 @@ int bitmap_setpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, uint32_
 						cpx = 0;
 						charx++;
 						xupdated = false;
+						assert(off >= 0);
 						off = vmem_next_offset(vstat.vmem, off);
 					}
 				}
-- 
GitLab