Skip to content

Commit

Permalink
Fixed danmar#2132 (Internal error. Token::Match called with varid 0.)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Marjamäki committed Oct 26, 2010
1 parent 27235f2 commit b6106dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/checkbufferoverrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit b6106dd

Please sign in to comment.