hardware/Model01: Fix a possible out of bounds error in getCrgbAt()

Fixes #660.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/681/head
Gergely Nagy 5 years ago
parent f43ef0b2a1
commit 9d95530927
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -121,7 +121,7 @@ int8_t Model01::getLedIndex(KeyAddr key_addr) {
}
cRGB Model01::getCrgbAt(int8_t i) {
if (i < 0 || i > 64)
if (i < 0 || i >= 64)
return {0, 0, 0};
if (i < 32) {

Loading…
Cancel
Save