Skip to content

Commit

Permalink
Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
mondalaci committed Mar 15, 2024
2 parents e46f353 + c8f6e67 commit f92974d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions right/src/macros/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit f92974d

Please sign in to comment.