Skip to content

Commit

Permalink
Thou shalt not trust Adafruit GFX
Browse files Browse the repository at this point in the history
Especially when using the co-ordinates it generates as a means to access memory.
  • Loading branch information
mrcodetastic committed Aug 14, 2020
1 parent b504f62 commit db198d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ void RGB64x32MatrixPanel_I2S_DMA::updateMatrixDMABuffer(int16_t x_coord, int16_t

// Check that the co-ordinates are within range, or it'll break everything big time.
// Valid co-ordinates are from 0 to (MATRIX_XXXX-1)
if ( x_coord >= MATRIX_WIDTH || y_coord >= MATRIX_HEIGHT) {
if ( x_coord < 0 || y_coord < 0 || x_coord >= MATRIX_WIDTH || y_coord >= MATRIX_HEIGHT) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "Faptastic",
"url": "https://github.com/mrfaptastic/"
},
"version": "1.2.1",
"version": "1.2.2",
"frameworks": "arduino",
"platforms": "esp32",
"examples": [
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP32 64x32 LED MATRIX HUB75 DMA Display
version=1.2.1
version=1.2.2
author=Faptastic
maintainer=Faptastic
sentence=Experimental DMA based LED Matrix HUB75 Library
Expand Down

0 comments on commit db198d7

Please sign in to comment.