From 460f63558da2b41d8c2adf0b2d6501dacd6ef585 Mon Sep 17 00:00:00 2001 From: umanamente Date: Wed, 3 Aug 2022 22:52:10 -0700 Subject: [PATCH] Fixed typo in checkautovariables.cpp: getPointerDepth() (#4329) --- lib/checkautovariables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkautovariables.cpp b/lib/checkautovariables.cpp index e85796d61..2fc6efa0b 100644 --- a/lib/checkautovariables.cpp +++ b/lib/checkautovariables.cpp @@ -442,7 +442,7 @@ static int getPointerDepth(const Token *tok) int n = 0; std::pair 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; }