From 82b749a93a6ace8856d3e16436470a9cc0f5eb07 Mon Sep 17 00:00:00 2001 From: rdts <28197082+rdts@users.noreply.github.com> Date: Wed, 11 Apr 2018 19:12:33 +0200 Subject: [PATCH] Update Sprite.cpp Hi, I found a bug. _width and _height need to be initialized properly. That is because they are used in drawString(). Lines 4118 and 4120 in TFT_eSPI.cpp. --- Extensions/Sprite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extensions/Sprite.cpp b/Extensions/Sprite.cpp index 0ebca60..276fa32 100644 --- a/Extensions/Sprite.cpp +++ b/Extensions/Sprite.cpp @@ -49,8 +49,8 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames) if ( w < 1 || h < 1 ) return NULL; - _iwidth = _dwidth = w; - _iheight = _dheight = h; + _width = _iwidth = _dwidth = w; + _height = _iheight = _dheight = h; this->cursor_x = 0; this->cursor_y = 0;