Fix a silly off-by-one in the font cache code. Thanks to @easysid for noticing it!

This commit is contained in:
LemonBoy 2014-11-18 23:37:43 +01:00
parent e9cdee9701
commit 95c41381ac

2
bar.c
View File

@ -317,7 +317,7 @@ select_drawable_font (const uint16_t c)
*/ */
for (int i = 0; font_list[i] != NULL; i++) { for (int i = 0; font_list[i] != NULL; i++) {
font_t *font = font_list[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) font->width_lut[c - font->char_min].character_width != 0)
return font; return font;
} }