Bail out if variable id is 0. This should be reverted when #563 has been fixed
This commit is contained in:
parent
eb691857fd
commit
5087dc6b46
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue