:: commit a429b0c46585b97056d38837cf2c27df70d2b113

Mintsuki <mintsuki@protonmail.com> — 2025-12-28 13:30

parents: 4b91cc1c70

lib/gterm: Do not allow font widths != 8

diff --git a/common/lib/gterm.c b/common/lib/gterm.c
index cb262be5..0227f275 100644
--- a/common/lib/gterm.c
+++ b/common/lib/gterm.c
@@ -665,6 +665,8 @@ bool gterm_init(struct fb_info **_fbs, size_t *_fbs_count,
     char *menu_font_size = config_get_value(config, 0, "TERM_FONT_SIZE");
     if (menu_font_size != NULL) {
         parse_resolution(&tmp_font_width, &tmp_font_height, NULL, menu_font_size);
+        // XXX: Do not allow widths != 8
+        tmp_font_width = 8;
 
         size_t tmp_font_size = (tmp_font_width * tmp_font_height * FLANTERM_FB_FONT_GLYPHS) / 8;
 
tab: 248 wrap: offon