Skip to content

Commit

Permalink
Fix scope, value
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jul 16, 2023
1 parent 5fc9d81 commit bf23791
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5631,7 +5631,7 @@ static void valueFlowForwardConst(Token* start,
if (scope->type == Scope::ScopeType::eIf) {
MathLib::bigint result{};
bool error{};
execute(tok->scope()->bodyStart->linkAt(-1)->astOperand2(), pm, &result, &error, settings);
execute(scope->bodyStart->linkAt(-1)->astOperand2(), pm, &result, &error, settings);
if (!result && !error) {
setValue = false;
break;
Expand All @@ -5652,7 +5652,7 @@ static void valueFlowForwardConst(Token* start,
ValueFlow::Value v{ value };
if (refs.size() > 1)
v.setInconclusive();
v.errorPath.insert(value.errorPath.end(), it->errors.cbegin(), it->errors.cend());
v.errorPath.insert(v.errorPath.end(), it->errors.cbegin(), it->errors.cend());
setTokenValue(tok, std::move(v), settings);
return;
}
Expand Down

0 comments on commit bf23791

Please sign in to comment.