Avoid evaluating conditions twice when there isnt a value to evaluate (#5711)

This commit is contained in:
Paul Fultz II 2023-12-01 04:34:36 -06:00 committed by GitHub
parent 831dc7c3ae
commit 7e8ea5bcf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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;