]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
check 'ternaries' count
[xonotic/gmqcc.git] / 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;
             }