]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
Merge pull request #85 from matthiaskrgr/master
[xonotic/gmqcc.git] / 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;
 }