From: Wolfgang (Blub) Bumiller Date: Sun, 28 Oct 2012 19:02:57 +0000 (+0100) Subject: ast_store needs to take over the type of its destination X-Git-Tag: 0.1-rc1~17 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=90571a6151641e6bbdb854438b530146fd1d8bca;p=xonotic%2Fgmqcc.git ast_store needs to take over the type of its destination --- diff --git a/ast.c b/ast.c index a0af130..2350e20 100644 --- a/ast.c +++ b/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; }