Skip to content

Commit cc00b2d

Browse files
Update checkcondition.cpp
1 parent 9c6fbd8 commit cc00b2d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkcondition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,7 @@ static bool checkBoolConditionalAssign(const Token* condTok, const Token* assign
18761876
const MathLib::bigint compVal = varTok->astSibling()->getKnownIntValue();
18771877
if (compVal < 0 || compVal > 1)
18781878
return false;
1879-
isNegation = condTok->str() == "!=" == (compVal == 1);
1879+
isNegation = (condTok->str() == "!=") == (compVal == 1);
18801880
}
18811881
isRedundant = (isNegation && val == 0) || (!isNegation && val == 1);
18821882
return true;

0 commit comments

Comments
 (0)