diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 6db8a0c06..9c37e6baa 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -763,7 +763,7 @@ static std::vector valueFlowGetArrayIndexes(const Token * cons unsigned int indexvarid = 0; const std::vector empty; std::vector indexes; - for (const Token *tok2 = tok; indexes.size() < dimensions && Token::Match(tok2, "["); tok2 = tok2->link()->next()) { + for (const Token *tok2 = tok; indexes.size() < dimensions && Token::simpleMatch(tok2, "["); tok2 = tok2->link()->next()) { if (!tok2->astOperand2()) return empty;