unsignedLessThanZero cppcheck

This commit is contained in:
gtsoul-tech 2024-04-23 12:27:43 +03:00
parent c4bffd7cef
commit 06fc35321d

View File

@ -284,7 +284,7 @@ void ParsedLogical::parseLogicalCombination(unsigned id, const char *logical,
if (logical[i] == '(') {
paren += 1;
} else if (logical[i] == ')') {
if (paren <= 0) {
if (paren == 0) {
throw LocatedParseError("Not enough left parentheses");
}
paren -= 1;