jonas054: fixed #807 (cppcheck crashes scanning ruby 1.9.1)
This commit is contained in:
parent
6923a09001
commit
dbfba8c2a6
|
@ -3188,7 +3188,7 @@ bool Tokenizer::simplifyKnownVariables()
|
||||||
{
|
{
|
||||||
const Token *endpar = tok3->next()->link();
|
const Token *endpar = tok3->next()->link();
|
||||||
bool bailout = false;
|
bool bailout = false;
|
||||||
for (const Token *tok4 = tok3; tok4 != endpar; tok4 = tok4->next())
|
for (const Token *tok4 = tok3; tok4 && tok4 != endpar; tok4 = tok4->next())
|
||||||
{
|
{
|
||||||
if (Token::Match(tok4, "++|-- %varid%", varid) ||
|
if (Token::Match(tok4, "++|-- %varid%", varid) ||
|
||||||
Token::Match(tok4, "%varid% ++|--", varid))
|
Token::Match(tok4, "%varid% ++|--", varid))
|
||||||
|
|
Loading…
Reference in New Issue