Skip to content

Commit 674ecce

Browse files
1 parent f0a6c26 commit 674ecce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Arduino_GFX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ size_t Arduino_GFX::write(uint8_t c)
23082308
uint8_t gw = pgm_read_byte(&glyph->width),
23092309
xa = pgm_read_byte(&glyph->xAdvance);
23102310
int8_t xo = pgm_read_sbyte(&glyph->xOffset);
2311-
if (wrap && ((cursor_x + ((xo + gw) * textsize_x) - 1) > _max_text_x))
2311+
if (wrap && ((cursor_x + (((int16_t)xo + gw) * textsize_x) - 1) > _max_text_x))
23122312
{
23132313
cursor_x = _min_text_x; // Reset x to zero, advance y by one line
23142314
cursor_y += (int16_t)textsize_y * pgm_read_byte(&gfxFont->yAdvance);

0 commit comments

Comments
 (0)