mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
Copy over the array-count in ast_type_adopt/ast_type_copy
This commit is contained in:
parent
f0687adbaa
commit
ac18d58ffc
1 changed files with 3 additions and 0 deletions
3
ast.c
3
ast.c
|
@ -109,6 +109,7 @@ ast_value* ast_value_copy(const ast_value *self)
|
|||
fromex = &self->expression;
|
||||
selfex = &cp->expression;
|
||||
selfex->variadic = fromex->variadic;
|
||||
selfex->count = fromex->count;
|
||||
for (i = 0; i < vec_size(fromex->params); ++i) {
|
||||
ast_value *v = ast_value_copy(fromex->params[i]);
|
||||
if (!v) {
|
||||
|
@ -134,6 +135,7 @@ bool ast_type_adopt_impl(ast_expression *self, const ast_expression *other)
|
|||
fromex = &other->expression;
|
||||
selfex = &self->expression;
|
||||
selfex->variadic = fromex->variadic;
|
||||
selfex->count = fromex->count;
|
||||
for (i = 0; i < vec_size(fromex->params); ++i) {
|
||||
ast_value *v = ast_value_copy(fromex->params[i]);
|
||||
if (!v)
|
||||
|
@ -185,6 +187,7 @@ ast_expression* ast_type_copy(lex_ctx ctx, const ast_expression *ex)
|
|||
selfex->next = NULL;
|
||||
|
||||
selfex->variadic = fromex->variadic;
|
||||
selfex->count = fromex->count;
|
||||
for (i = 0; i < vec_size(fromex->params); ++i) {
|
||||
ast_value *v = ast_value_copy(fromex->params[i]);
|
||||
if (!v) {
|
||||
|
|
Loading…
Reference in a new issue