We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0a6c26 commit 674ecceCopy full SHA for 674ecce
src/Arduino_GFX.cpp
@@ -2308,7 +2308,7 @@ size_t Arduino_GFX::write(uint8_t c)
2308
uint8_t gw = pgm_read_byte(&glyph->width),
2309
xa = pgm_read_byte(&glyph->xAdvance);
2310
int8_t xo = pgm_read_sbyte(&glyph->xOffset);
2311
- if (wrap && ((cursor_x + ((xo + gw) * textsize_x) - 1) > _max_text_x))
+ if (wrap && ((cursor_x + (((int16_t)xo + gw) * textsize_x) - 1) > _max_text_x))
2312
{
2313
cursor_x = _min_text_x; // Reset x to zero, advance y by one line
2314
cursor_y += (int16_t)textsize_y * pgm_read_byte(&gfxFont->yAdvance);
0 commit comments