]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
check 'ternaries' count
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 19:50:27 +0000 (20:50 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 19:50:27 +0000 (20:50 +0100)
parser.c

index 0ebf2727443b694b9eb62bf459067104aca0b8e3..525192e48f2b64b1a2114bebc25c858d56375d68 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1278,7 +1278,7 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
             }
 
             /* a colon without a pervious question mark cannot be a ternary */
-            if (op->id == opid2(':','?')) {
+            if (!ternaries && op->id == opid2(':','?')) {
                 parser->tok = ':';
                 break;
             }