simplifyKnownVariables: fixed a segmentation fault
This commit is contained in:
parent
7c3fbd7060
commit
d44523144a
|
@ -1215,11 +1215,8 @@ bool Tokenizer::simplifyKnownVariables()
|
||||||
else if ( TOKEN::Match(tok2, "%var% = %num% ;") )
|
else if ( TOKEN::Match(tok2, "%var% = %num% ;") )
|
||||||
{
|
{
|
||||||
unsigned int varid = tok2->varId();
|
unsigned int varid = tok2->varId();
|
||||||
TOKEN *tok3 = tok2;
|
for ( TOKEN *tok3 = tok2->next(); tok3; tok3 = tok3->next() )
|
||||||
while ( tok3 )
|
|
||||||
{
|
{
|
||||||
tok3 = tok3->next();
|
|
||||||
|
|
||||||
// Perhaps it's a loop => bail out
|
// Perhaps it's a loop => bail out
|
||||||
if ( TOKEN::Match(tok3, "[{}]") )
|
if ( TOKEN::Match(tok3, "[{}]") )
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue