Closed
Description
When using ArduinoGraphics on the Led Matrix and doing a scroll left random bits are showing in the RIGHT columns. This is happening as well when doing a scroll up, on the bottom lines.
It was noticed already doing development given the remark in the function endDraw()
in Arduino_LED_matrix.h
:
The root cause is related to ArduinoGraphics as it returns NEGATIVE numbers when scrolling. In the function set()
in Arduino_led_matrix.h
it checks for out of bound values, BUT not for negative values for Y and X. Then when doing a _canvasBuffer[y][x]
will cause under desired memory to be written.
Solution :
change in function set()
, line 251 from:
to:
if (y >= canvasHeight || x >= canvasWidth || y < 0 || x < 0) {