From a172bd4dbb7b95a4800561736eda1d46f69dfc28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Fri, 24 Jan 2025 13:38:30 -0500
Subject: [PATCH] Add silly check to make coverity happy.

This is in the fastpath, but it's on the slow side where I don't
mind the occasional extra silly check.
---
 src/conio/bitmap_con.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conio/bitmap_con.c b/src/conio/bitmap_con.c
index fc1a08f526..127d97c3a9 100644
--- a/src/conio/bitmap_con.c
+++ b/src/conio/bitmap_con.c
@@ -779,7 +779,7 @@ draw_char_row_slow(struct blockstate *bs, struct charstate *cs, uint32_t y)
 	for(unsigned x = 0; x < vstat.charwidth; x++) {
 		unsigned bitnum = x & 0x07;
 		if (bs->expand && x == bs->font_data_width) {
-			if (cs->gexpand)
+			if (cs->gexpand && x > 0)
 				fbb = cs->font[cs->fontoffset - 1] & (0x80 >> ((x - 1) & 7));
 			else
 				fbb = 0;
-- 
GitLab