mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
keep track of the highest parameter count of calls for later for varargs
This commit is contained in:
parent
3429e7d0cb
commit
2f9db8972e
1 changed files with 5 additions and 0 deletions
5
parser.c
5
parser.c
|
@ -100,6 +100,9 @@ typedef struct {
|
|||
|
||||
/* pragma flags */
|
||||
bool noref;
|
||||
|
||||
/* collected information */
|
||||
size_t max_param_count;
|
||||
} parser_t;
|
||||
|
||||
static const ast_expression *intrinsic_debug_typestring = (ast_expression*)0x10;
|
||||
|
@ -1403,6 +1406,8 @@ static bool parser_close_call(parser_t *parser, shunt *sy)
|
|||
params->exprs = NULL;
|
||||
ast_delete(params);
|
||||
}
|
||||
if (parser->max_param_count < paramcount)
|
||||
parser->max_param_count = paramcount;
|
||||
(void)!ast_call_check_types(call);
|
||||
} else {
|
||||
parseerror(parser, "invalid function call");
|
||||
|
|
Loading…
Reference in a new issue