mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
have function declarations of functions with prototypes take over the actual declaration's body's context data
This commit is contained in:
parent
cadf877eb4
commit
adda894976
1 changed files with 2 additions and 0 deletions
2
parser.c
2
parser.c
|
@ -2004,6 +2004,8 @@ static bool parser_variable(parser_t *parser, ast_block *localblock)
|
|||
/* copy over the parameter names */
|
||||
for (param = 0; param < fval->expression.params_count; ++param)
|
||||
ast_value_set_name(proto->expression.params[param], fval->expression.params[param]->name);
|
||||
/* copy the new context */
|
||||
ast_ctx(proto) = ast_ctx(fval);
|
||||
|
||||
/* now ditch the rest of the new data */
|
||||
ast_function_delete(func);
|
||||
|
|
Loading…
Reference in a new issue