]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fix a very possible bug
authorDale Weiler <killfieldengine@gmail.com>
Fri, 28 Dec 2012 12:50:37 +0000 (12:50 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 28 Dec 2012 12:50:37 +0000 (12:50 +0000)
parser.c
splint.sh

index cfb14d3c02306f40e1947c2354c710975383ea5c..f53167ad8e66ae1438da62a34cc062322e509599 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1665,7 +1665,7 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
             const oper_info *olast = NULL;
             size_t o;
             for (o = 0; o < operator_count; ++o) {
-                if ((!(operators[o].flags & OP_PREFIX) == wantop) &&
+                if (((!(operators[o].flags & OP_PREFIX) == !!wantop)) &&
                     /* !(operators[o].flags & OP_SUFFIX) && / * remove this */
                     !strcmp(parser_tokval(parser), operators[o].op))
                 {
index ae688ee645607151589ed86104df31bdc8b912ce..e51b007f465c68211312752b7ca749dee6c40ce0 100755 (executable)
--- a/splint.sh
+++ b/splint.sh
@@ -63,7 +63,6 @@ FLAGS_MAYBE="\
 #these don't need to be here to onhibit the warning
 # remove one flag from here at a time while fixing the code so that
 FLAGS_TOFIX="\
-    -boolcompare         \
     -initallelements     \
     -castfcnptr          \
     -evalorder"