Skip to content

Commit 443436f

Browse files
Update checkother.cpp
1 parent e3ed3f0 commit 443436f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/checkother.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,8 @@ static bool isSimpleExpr(const Token* tok, const Variable* var, const Settings&
11631163
return false;
11641164
if (tok->isNumber() || tok->tokType() == Token::eString || tok->tokType() == Token::eChar || tok->isBoolean())
11651165
return true;
1166+
if (isNullOperand(tok))
1167+
return true;
11661168
bool needsCheck = tok->varId() > 0;
11671169
if (!needsCheck) {
11681170
if (tok->isArithmeticalOp())

0 commit comments

Comments
 (0)