figments: display: assert that we dont exceed pixel array bounds
This commit is contained in:
parent
74c2ddb405
commit
e5d4eea02b
@ -43,6 +43,7 @@ CRGB&
|
||||
Display::pixelAt(int idx)
|
||||
{
|
||||
const int kx = idx % pixelCount();
|
||||
assert(abs(kx) < pixelCount());
|
||||
if (kx < 0) {
|
||||
return m_pixels[pixelCount() + 1 + kx];
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user