Archived
1
0

Fixing layer stack evaluation

- Layers were stacked correctly, but evaluated backwards
This commit is contained in:
Jacob Alexander 2015-08-21 20:33:47 -07:00
parent 9c52fb32fa
commit 51486bc4e1

View File

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