diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 8b0e95ec5..65888aeed 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -6672,10 +6672,12 @@ bool Tokenizer::simplifyConditions() result = (op1 == op2); else if (cmp == "!=") result = (op1 != op2); - else if (cmp == ">=" || cmp == "<=") - result = true; + else if (cmp == ">=") + result = (op1 || !op2); else if (cmp == ">") result = (op1 && !op2); + else if (cmp == "<=") + result = (!op1 || op2); else if (cmp == "<") result = (!op1 && op2); else