Fixed typo in checkautovariables.cpp: getPointerDepth() (#4329)

This commit is contained in:
umanamente 2022-08-03 22:52:10 -07:00 committed by GitHub
parent c0f55a2b85
commit 460f63558d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -442,7 +442,7 @@ static int getPointerDepth(const Token *tok)
int n = 0;
std::pair<const Token*, const Token*> decl = Token::typeDecl(tok);
for (const Token* tok2 = decl.first; tok2 != decl.second; tok2 = tok2->next())
if (Token::simpleMatch(tok, "*"))
if (Token::simpleMatch(tok2, "*"))
n++;
return n;
}