From b6106ddf72fd5552f7268df3d1e8b1e3752f7f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 26 Oct 2010 18:10:03 +0200 Subject: [PATCH] Fixed #2132 (Internal error. Token::Match called with varid 0.) --- lib/checkbufferoverrun.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 43239c20e..4ca040391 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1179,6 +1179,7 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable() } else if (indentlevel > 0 && Token::Match(tok, "[;{}] %var% = %str% ;") && + tok->next()->varId() > 0 && NULL != Token::findmatch(_tokenizer->tokens(), "[;{}] const| %type% * %varid% ;", tok->next()->varId())) { size = 1 + int(tok->tokAt(3)->strValue().size());