From cea40168e07c3f89c0df3537dc80b1a5573df468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 26 Dec 2015 01:52:43 +0100 Subject: [PATCH] Code fix. Used wrong variable in condition, leading to segfaults. --- lib/checkfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 4d4921bca..ca1f46263 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -96,7 +96,7 @@ void CheckFunctions::invalidFunctionUsage() while (top->astParent() && top->astParent()->str() != "," && top->astParent() != tok->next()) top = top->astParent(); const Token *var = top; - while (Token::Match(top, ".|::")) + while (Token::Match(var, ".|::")) var = var->astOperand2(); if (Token::Match(top, "%comp%|%oror%|&&|!|true|false") || (var && var->variable() && Token::Match(var->variable()->typeStartToken(), "bool"))) {