]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
copying the output type on ast_array_index_codegen
authorWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 14:15:58 +0000 (15:15 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 14:49:04 +0000 (15:49 +0100)
ast.c

diff --git a/ast.c b/ast.c
index ddbffb961d20f31c8ddadfa6d44e0f12df4029a7..dbb2012f383bffa9ab6ef2654cd9516a813ca0f1 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -2253,6 +2253,8 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva
 
         *out = ir_call_value(call);
         self->expression.outr = *out;
+        (*out)->vtype = self->expression.vtype;
+        codegen_output_type(self, *out);
         return true;
     }
 
@@ -2278,6 +2280,8 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva
         compile_error(ast_ctx(self), "array indexing here needs an integer constant");
         return false;
     }
+    (*out)->vtype = self->expression.vtype;
+    codegen_output_type(self, *out);
     return true;
 }