From bdf2c9ba75caa8ae2265c7b589b3692e0c03498a Mon Sep 17 00:00:00 2001 From: Bodmer Date: Thu, 19 Mar 2020 22:20:48 +0000 Subject: [PATCH] Fix #572 --- Extensions/Sprite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extensions/Sprite.cpp b/Extensions/Sprite.cpp index 4d87024..886e9da 100644 --- a/Extensions/Sprite.cpp +++ b/Extensions/Sprite.cpp @@ -2349,12 +2349,12 @@ void TFT_eSprite::drawGlyph(uint16_t code) } else { - if( this->textwrapX && ((this->cursor_x + this->gWidth[gNum] + this->gdX[gNum]) >= _iwidth)) { + if( this->textwrapX && ((this->cursor_x + this->gWidth[gNum] + this->gdX[gNum]) > _iwidth)) { this->cursor_y += this->gFont.yAdvance; this->cursor_x = 0; } - if( this->textwrapY && ((this->cursor_y + this->gFont.yAdvance) >= _iheight)) this->cursor_y = 0; + if( this->textwrapY && ((this->cursor_y + this->gFont.yAdvance) > _iheight)) this->cursor_y = 0; if ( this->cursor_x == 0) this->cursor_x -= this->gdX[gNum];