diff --git a/Extensions/Sprite.cpp b/Extensions/Sprite.cpp index 832abb9..faeaae2 100644 --- a/Extensions/Sprite.cpp +++ b/Extensions/Sprite.cpp @@ -716,7 +716,7 @@ void TFT_eSprite::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const u uint32_t ww = (w+7) & 0xFFF8; for (int32_t yp = 0; yp2) && (font<9)) { // This is slower than above but is more convenient for the RLE fonts - flash_address = pgm_read_dword( (const void*)pgm_read_dword( &(fontdata[font].chartbl ) ) + uniCode*sizeof(void *) ); + flash_address = pgm_read_dword( (const void*)(pgm_read_dword( &(fontdata[font].chartbl ) ) + uniCode*sizeof(void *) )); width = pgm_read_byte( (uint8_t *)pgm_read_dword( &(fontdata[font].widthtbl ) ) + uniCode ); height= pgm_read_byte( &fontdata[font].height ); } diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index ad27dcb..85e814f 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -35,9 +35,9 @@ // If it is a 16bit serial display we must transfer 16 bits every time #ifdef RPI_ILI9486_DRIVER - #define CMD_BITS 16-1 + #define CMD_BITS (16-1) #else - #define CMD_BITS 8-1 + #define CMD_BITS (8-1) #endif // Fast block write prototype @@ -4270,7 +4270,7 @@ int16_t TFT_eSPI::drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t font) { if ((font>2) && (font<9)) { - flash_address = pgm_read_dword( (const void*)pgm_read_dword( &(fontdata[font].chartbl ) ) + uniCode*sizeof(void *) ); + flash_address = pgm_read_dword( (const void*)(pgm_read_dword( &(fontdata[font].chartbl ) ) + uniCode*sizeof(void *))); width = pgm_read_byte( (uint8_t *)pgm_read_dword( &(fontdata[font].widthtbl ) ) + uniCode ); height= pgm_read_byte( &fontdata[font].height ); }