Skip to content

Commit

Permalink
Merge pull request #9 from suppertails66/fix-elseif
Browse files Browse the repository at this point in the history
Fix spurious execution of other conditional branches after a true ELSEIF
  • Loading branch information
Clownacy committed Mar 17, 2024
2 parents 055ff39 + 3de581a commit 67fb736
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions semantic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4474,9 +4474,14 @@ static void ProcessStatement(SemanticState *state, Statement *statement, const c

/* If this condition is false, then mark this as the false if-level. */
if (state->true_already_found || value == 0)
{
state->false_if_level = state->current_if_level;
}
else
{
state->false_if_level = 0;
state->true_already_found = cc_true;
}
}
}

Expand Down

0 comments on commit 67fb736

Please sign in to comment.