From 0787038934f3ccc2ab6959896b2cd87fc7585c9f Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Wed, 21 Nov 2012 20:50:27 +0100 Subject: [PATCH] check 'ternaries' count --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 0ebf272..525192e 100644 --- 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; } -- 2.39.2