simplify calculations: Don't simplify division with 0

This commit is contained in:
Daniel Marjamäki 2009-04-06 19:43:54 +02:00
parent 638d18cfc8
commit 6fb18b3ddc
1 changed files with 4 additions and 0 deletions

View File

@ -2112,6 +2112,10 @@ bool Tokenizer::simplifyCalculations()
{
tok = tok->next();
// Don't simplify "%num% / 0"
if (Token::simpleMatch(tok->next(), "/ 0"))
continue;
switch (*(tok->strAt(1)))
{
case '+':