diff --git a/right/src/macros/commands.c b/right/src/macros/commands.c index 1d63736e..d2b1af6d 100644 --- a/right/src/macros/commands.c +++ b/right/src/macros/commands.c @@ -602,7 +602,6 @@ static bool processIfLayerCommand(parser_context_t* ctx, bool negate) return (queryLayerIdx == ActiveLayer) != negate; } - static bool processIfLayerToggledCommand(parser_context_t* ctx, bool negate) { if (Macros_DryRun) { @@ -611,7 +610,6 @@ static bool processIfLayerToggledCommand(parser_context_t* ctx, bool negate) return (LayerStack_IsLayerToggled()) != negate; } - static bool processIfCommand(parser_context_t* ctx) { bool res = Macros_ConsumeBool(ctx); @@ -1180,7 +1178,12 @@ uint8_t Macros_TryConsumeKeyId(parser_context_t* ctx) uint8_t keyId = MacroKeyIdParser_TryConsumeKeyId(ctx); if (keyId == 255 && isNUM(ctx)) { - return Macros_ConsumeInt(ctx); + uint8_t num = Macros_ConsumeInt(ctx); + if (Macros_ParserError) { + return 255; + } else { + return num; + } } else { return keyId; }