From 4fae4fa6cb8e02f9d915b3c8c9647cceef13d007 Mon Sep 17 00:00:00 2001 From: Bodmer Date: Mon, 21 Feb 2022 20:10:05 +0000 Subject: [PATCH] Fix #1656 --- TFT_eSPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index 7375933..1e64a8b 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -5191,7 +5191,7 @@ void TFT_eSPI::setFreeFont(const GFXfont *f) uint16_t numChars = pgm_read_word(&gfxFont->last) - pgm_read_word(&gfxFont->first); // Find the biggest above and below baseline offsets - for (uint8_t c = 0; c < numChars; c++) { + for (uint16_t c = 0; c < numChars; c++) { GFXglyph *glyph1 = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c]); int8_t ab = -pgm_read_byte(&glyph1->yOffset); if (ab > glyph_ab) glyph_ab = ab;