Skip to content

Commit

Permalink
Avoid evaluating conditions twice when there isnt a value to evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Nov 30, 2023
1 parent 42a64d4 commit f4fcd56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/programmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ static bool evaluateCondition(const std::string& op,
evaluateCondition(op, r, condition->astOperand2(), pm, settings)) {
return true;
}
if(!pm.hasValue(condition->exprId()))
return false;
}
MathLib::bigint result = 0;
bool error = false;
Expand Down

0 comments on commit f4fcd56

Please sign in to comment.