From f2887f1208e27d956543929409b2be3d41549151 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 25 Nov 2012 19:44:21 +0100 Subject: [PATCH] a '(void)' parameter list does not mean 1 parameter of type void, but empty... xonotic needs this --- parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parser.c b/parser.c index 370f92f..197cd90 100644 --- a/parser.c +++ b/parser.c @@ -3151,6 +3151,9 @@ static ast_value *parse_parameter_list(parser_t *parser, ast_value *var) } } + if (vec_size(params) == 1 && params[0]->expression.vtype == TYPE_VOID) + vec_free(params); + /* sanity check */ if (vec_size(params) > 8 && opts_standard == COMPILER_QCC) (void)!parsewarning(parser, WARN_EXTENSIONS, "more than 8 parameters are not supported by this standard"); -- 2.39.2