Tokenizer: it is bad to do: 'tok->previous()->deleteThis()'

This commit is contained in:
Daniel Marjamäki 2010-05-17 19:50:36 +02:00
parent 49c9413798
commit 453adb4ea4
1 changed files with 4 additions and 1 deletions

View File

@ -5200,7 +5200,10 @@ bool Tokenizer::simplifyKnownVariables()
tok3 = tok3->next(); tok3 = tok3->next();
tok3->str(value); tok3->str(value);
if (tok3->previous()->str() == "*" && valueIsPointer) if (tok3->previous()->str() == "*" && valueIsPointer)
tok3->previous()->deleteThis(); {
tok3 = tok3->previous();
tok3->deleteThis();
}
ret = true; ret = true;
} }