Bail out if variable id is 0. This should be reverted when #563 has been fixed

This commit is contained in:
Daniel Marjamäki 2009-08-06 21:48:22 +02:00
parent eb691857fd
commit 5087dc6b46
1 changed files with 3 additions and 0 deletions

View File

@ -248,6 +248,9 @@ void CheckBufferOverrun::checkScope(const Token *tok, const char *varname[], con
else
continue;
/** @todo this condition should be redundant, the variable id should never be 0 for variables */
if (counter_varid == 0)
continue;
if (Token::Match(tok2, "%varid% < %num% ;", counter_varid))
{