makecode-extensions/OLED12864_I2C

Panic 841 with coordinates outside the screen

Opened this issue · 0 comments

If coordinates are outside the screen, it calculates an index outside the _screen buffer, which triggers panic 841.

let ind = x * (_ZOOM + 1) + page * 128 + 1

ind = (x + n) * 5 * (_ZOOM + 1) + y * 128 + i * (_ZOOM + 1) + 1