X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Macro%2FPartialMap%2Fmacro.c;h=7161fbf9e495d92eb9ec5d6c42f50afae355555a;hb=51486bc4e16830c16c30f696b3a4f84c93a5baf8;hp=8cebce4bf4332b33f27a084665956427f79f7844;hpb=59c14fcdea7403288dab85b64b66c6daaa8404fc;p=kiibohd-controller.git diff --git a/Macro/PartialMap/macro.c b/Macro/PartialMap/macro.c index 8cebce4..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 ] ]; @@ -470,7 +470,7 @@ inline void Macro_interconnectAdd( void *trigger_ptr ) } // Check if ScanCode is out of range - if ( scanCode > MaxScanCode ) + if ( trigger->scanCode > MaxScanCode ) { warn_msg("ScanCode is out of range/not defined - "); error = 1;