Merge pull request #681 from keyboardio/Model01/getCRGBat-oob-fix

Fix a possible out of bounds error in Model01::getCrgbAt()
pull/683/head
Jesse Vincent 5 years ago committed by GitHub
commit 887f1d18b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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