]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Locals of type .vector will now also properly generate all 3 locals
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 10 Nov 2012 11:44:18 +0000 (12:44 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 11 Nov 2012 09:13:01 +0000 (10:13 +0100)
ast.c

diff --git a/ast.c b/ast.c
index b5c20a46b3b3a8bc1e6f64c8e5ed080fbd556112..2f218e37a4a776bc33dbeec92bf166a7be515110 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -966,6 +966,8 @@ bool ast_local_codegen(ast_value *self, ir_function *func, bool param)
     v = ir_function_create_local(func, self->name, self->expression.vtype, param);
     if (!v)
         return false;
+    if (self->expression.vtype == TYPE_FIELD)
+        v->fieldtype = self->expression.next->expression.vtype;
     v->context = ast_ctx(self);
 
     /* A constant local... hmmm...