simplify calculations: Don't simplify division with 0
This commit is contained in:
parent
638d18cfc8
commit
6fb18b3ddc
|
@ -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 '+':
|
||||
|
|
Loading…
Reference in New Issue