From: Wolfgang Bumiller <blub@speed.at>
Date: Thu, 20 Dec 2012 19:55:56 +0000 (+0100)
Subject: fix -fcorrect-logic to use double-not instead of a single one - wow that was a bad one
X-Git-Tag: 0.2~41
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ccbccad994598da8c04523c1f01dfcff767f7182;p=xonotic%2Fgmqcc.git

fix -fcorrect-logic to use double-not instead of a single one - wow that was a bad one
---

diff --git a/parser.c b/parser.c
index 123241f..f7bcad1 100644
--- a/parser.c
+++ b/parser.c
@@ -903,12 +903,13 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
                                 return false;
                             }
                             out = (ast_expression*)ast_unary_new(ctx, type_not_instr[exprs[i]->expression.vtype], exprs[i]);
-                            if (!out)
-                                break;
+                            if (!out) break;
+                            out = (ast_expression*)ast_unary_new(ctx, type_not_instr[exprs[i]->expression.vtype], out);
+                            if (!out) break;
                             exprs[i] = out; out = NULL;
+                            if (OPTS_FLAG(PERL_LOGIC)) {
+                            }
                         }
-                        if (OPTS_FLAG(PERL_LOGIC))
-                            break;
                     }
                 }
                 out = (ast_expression*)ast_binary_new(ctx, generated_op, exprs[0], exprs[1]);