Skip to content

Commit 31959c3

Browse files
committed
Fix: prevent artefacts from appearing on the screen during a SCROLL_LEFT.
This fixes #226.
1 parent 0c2cc1c commit 31959c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class ArduinoLEDMatrix
250250

251251
#ifdef MATRIX_WITH_ARDUINOGRAPHICS
252252
virtual void set(int x, int y, uint8_t r, uint8_t g, uint8_t b) {
253-
if (y >= canvasHeight || x >= canvasWidth) {
253+
if (y >= canvasHeight || x >= canvasWidth || y < 0 || x < 0) {
254254
return;
255255
}
256256
// the r parameter is (mis)used to set the character to draw with

0 commit comments

Comments
 (0)