If layer is greater than max_layer, always fall back to EEPROM

Current behaviour will make higher layers not work & always return Key_NoKey
pull/365/head
James N. V. Cash 7 years ago
parent 604e64fb91
commit 5d53d77c6f

@ -54,7 +54,7 @@ Key EEPROMKeymap::getKeyOverride(uint8_t layer, byte row, byte col) {
Key key; Key key;
key = getKey(layer, row, col); key = getKey(layer, row, col);
if (key == Key_Transparent) if (key == Key_Transparent || layer >= max_layers_)
key = Layer.getKeyFromPROGMEM(layer, row, col); key = Layer.getKeyFromPROGMEM(layer, row, col);
return key; return key;
} }

Loading…
Cancel
Save