From dfedeeb5c14254cc4836c4f9067215507c619761 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sun, 23 Oct 2011 15:23:36 +0200 Subject: [PATCH] Bugfix: checknullpointer worked incorrect for complex first --- lib/checknullpointer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checknullpointer.cpp b/lib/checknullpointer.cpp index 5a94545b9..04e84e745 100644 --- a/lib/checknullpointer.cpp +++ b/lib/checknullpointer.cpp @@ -119,7 +119,7 @@ void CheckNullPointer::parseFunctionCall(const Token &tok, std::listnextArgument(); if (secondParameter && ((value == 0 && secondParameter->str() == "0") || (Token::Match(secondParameter, "%var%") && secondParameter->varId() > 0))) if (functionNames2.find(tok.str()) != functionNames2.end()) - var.push_back(tok.tokAt(4)); + var.push_back(secondParameter); } if (Token::Match(&tok, "printf|sprintf|snprintf|fprintf|fnprintf|scanf|sscanf|fscanf")) {