]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
be more strict here
authorWolfgang Bumiller <wry.git@bumiller.com>
Tue, 7 May 2013 18:13:19 +0000 (20:13 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Tue, 7 May 2013 18:13:19 +0000 (20:13 +0200)
parser.c

index 6ad55025c3896b9cf9d435985ad9b9a2cb45e92e..c95ff913005c7c020a25642e57ed30e6ac765fb2 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2227,8 +2227,8 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
     }
 
     parser->lex->flags.noops = true;
-    if (!vec_size(sy.out)) {
-        parseerror(parser, "empty expression");
+    if (vec_size(sy.out) != 1) {
+        parseerror(parser, "expression with not 1 but %lu output values...", (unsigned long) vec_size(sy.out));
         expr = NULL;
     } else
         expr = sy.out[0].out;