From 95c41381accc61cfd5a781390032bcabceb02172 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 18 Nov 2014 23:37:43 +0100 Subject: [PATCH] Fix a silly off-by-one in the font cache code. Thanks to @easysid for noticing it! --- bar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bar.c b/bar.c index bec8a15..f911913 100644 --- a/bar.c +++ b/bar.c @@ -317,7 +317,7 @@ select_drawable_font (const uint16_t c) */ for (int i = 0; font_list[i] != NULL; i++) { font_t *font = font_list[i]; - if (c > font->char_min && c < font->char_max && + if (c >= font->char_min && c <= font->char_max && font->width_lut[c - font->char_min].character_width != 0) return font; }