mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
ast_store needs to take over the type of its destination
This commit is contained in:
parent
cd8043fc18
commit
90571a6151
1 changed files with 11 additions and 0 deletions
11
ast.c
11
ast.c
|
@ -616,6 +616,17 @@ ast_store* ast_store_new(lex_ctx ctx, int op,
|
|||
self->dest = dest;
|
||||
self->source = source;
|
||||
|
||||
self->expression.vtype = dest->expression.vtype;
|
||||
if (dest->expression.next) {
|
||||
self->expression.next = ast_type_copy(ctx, dest);
|
||||
if (!self->expression.next) {
|
||||
ast_delete(self);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
self->expression.next = NULL;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue