From bf8fde6aeab3c72b2d8a8908e38e775800a98e6a Mon Sep 17 00:00:00 2001 From: thekunalsaini <43953836+thekunalsaini@users.noreply.github.com> Date: Mon, 2 Mar 2020 21:05:20 +0530 Subject: [PATCH] Addition of check Means out of bound of array check --- Adafruit_GFX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adafruit_GFX.cpp b/Adafruit_GFX.cpp index a7a541cc..2675bd6c 100644 --- a/Adafruit_GFX.cpp +++ b/Adafruit_GFX.cpp @@ -658,7 +658,7 @@ void Adafruit_GFX::image(PImage & img, uint16_t x, uint16_t y) { // Convert pixel from BMP to TFT format, push to display b = sdbuffer[buffidx++]; - g = sdbuffer[buffidx++]; + g = sdbuffer[buffidx++];// out of bound condition can be attached r = sdbuffer[buffidx++]; //pushColor(tft.Color565(r,g,b)); drawPixel(x + col, y + row, newColor(r, g, b)); @@ -668,4 +668,4 @@ void Adafruit_GFX::image(PImage & img, uint16_t x, uint16_t y) { } -#endif \ No newline at end of file +#endif