Skip to content

Commit 7e8ea5b

Browse files
authored
Avoid evaluating conditions twice when there isnt a value to evaluate (#5711)
1 parent 831dc7c commit 7e8ea5b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/programmemory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ static bool evaluateCondition(const std::string& op,
208208
evaluateCondition(op, r, condition->astOperand2(), pm, settings)) {
209209
return true;
210210
}
211+
if (!pm.hasValue(condition->exprId()))
212+
return false;
211213
}
212214
MathLib::bigint result = 0;
213215
bool error = false;

0 commit comments

Comments
 (0)