]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Macro/PartialMap/macro.c
Fixing order of layer debug stack display
[kiibohd-controller.git] / Macro / PartialMap / macro.c
index 76d830e3732d274cbe3a974d5456b9eee776c2bc..bc2d7d68643078ae25f04d55869398e0948c2baa 100644 (file)
@@ -226,10 +226,10 @@ void Macro_layerState( uint8_t state, uint8_t stateType, uint16_t layer, uint8_t
                print(" 0");
 
                // Iterate over the layer stack starting from the bottom of the stack
-               for ( uint16_t index = 0; index < macroLayerIndexStackSize; index++ )
+               for ( uint16_t index = macroLayerIndexStackSize; index > 0; index-- )
                {
                        print(":");
-                       printHex_op( macroLayerIndexStack[ index ], 0 );
+                       printHex_op( macroLayerIndexStack[ index - 1 ], 0 );
                }
 
                print( NL );