From 51486bc4e16830c16c30f696b3a4f84c93a5baf8 Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Fri, 21 Aug 2015 20:33:47 -0700 Subject: [PATCH] Fixing layer stack evaluation - Layers were stacked correctly, but evaluated backwards --- Macro/PartialMap/macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Macro/PartialMap/macro.c b/Macro/PartialMap/macro.c index f6c70ed..7161fbf 100644 --- a/Macro/PartialMap/macro.c +++ b/Macro/PartialMap/macro.c @@ -374,7 +374,7 @@ nat_ptr_t *Macro_layerLookup( TriggerGuide *guide, uint8_t latch_expire ) } // If no trigger macro is defined at the given layer, fallthrough to the next layer - for ( uint16_t layerIndex = 0; layerIndex < macroLayerIndexStackSize; layerIndex++ ) + for ( uint16_t layerIndex = macroLayerIndexStackSize; layerIndex != 0xFFFF; layerIndex-- ) { // Lookup Layer const Layer *layer = &LayerIndex[ macroLayerIndexStack[ layerIndex ] ];