diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 764bc63cd..b6ccd4aac 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -1098,7 +1098,7 @@ static Token * valueFlowSetConstantValue(Token *tok, const Settings *settings, b sz1->variable()->isArray() && !sz1->variable()->dimensions().empty() && sz1->variable()->dimensionKnown(0) && - Token::Match(sz2->astOperand2(), "*|[") && Token::Match(sz2->astOperand2()->astOperand1(), "%var%", varid1)) { + Token::Match(sz2->astOperand2(), "*|[") && Token::Match(sz2->astOperand2()->astOperand1(), "%varid%", varid1)) { ValueFlow::Value value(sz1->variable()->dimension(0)); if (!tok2->isTemplateArg() && settings->platformType != cppcheck::Platform::Unspecified) value.setKnown();