nopnop2002 / esp-idf-st7789

ST7789 Driver for esp-idf
MIT License
234 stars 56 forks source link

Variable 'size' overflows in function lcdDrawFinish() when setting the resolution to 320*240 #40

Closed MNDJ777 closed 6 months ago

MNDJ777 commented 6 months ago

My 320240 TFT can only displays a limited part when enabling frame buffer, then I found that variable 'size' overflowed, where it should be set to uint32_t. It doesn't work under resolution at 320240, https://github.com/nopnop2002/esp-idf-st7789/blob/8adf642cc26cf5d5815fb09d3006d063cb7c826e/components/st7789/st7789.c#L1069

nopnop2002 commented 6 months ago

Will it work correctly if you change to uint32_t in 320x240 TFT?

MNDJ777 commented 6 months ago

Will it work correctly if you change to uint32_t in 320x240 TFT?

Yes, it works perfectly now. before: 51eb34eb51690ef54e29fec797d312e after: 6c12f8d9c7e022f1055da09d2ff5f68

nopnop2002 commented 6 months ago

Thank you for the report. Fixed.