From 5d53d77c6f3dc6962ddb9397c8107bdbeca4a059 Mon Sep 17 00:00:00 2001 From: "James N. V. Cash" Date: Fri, 17 Nov 2017 17:13:23 -0500 Subject: [PATCH] If layer is greater than max_layer, always fall back to EEPROM Current behaviour will make higher layers not work & always return Key_NoKey --- src/Kaleidoscope/EEPROM-Keymap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kaleidoscope/EEPROM-Keymap.cpp b/src/Kaleidoscope/EEPROM-Keymap.cpp index a8bd42bf..72ed86e6 100644 --- a/src/Kaleidoscope/EEPROM-Keymap.cpp +++ b/src/Kaleidoscope/EEPROM-Keymap.cpp @@ -54,7 +54,7 @@ Key EEPROMKeymap::getKeyOverride(uint8_t layer, byte row, byte col) { Key key; key = getKey(layer, row, col); - if (key == Key_Transparent) + if (key == Key_Transparent || layer >= max_layers_) key = Layer.getKeyFromPROGMEM(layer, row, col); return key; }