From: Wolfgang Bumiller Date: Sat, 12 Jan 2013 14:15:58 +0000 (+0100) Subject: copying the output type on ast_array_index_codegen X-Git-Tag: before-library~283 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=5887afae626a79af9d12925d3061834a12dc9c81;p=xonotic%2Fgmqcc.git copying the output type on ast_array_index_codegen --- diff --git a/ast.c b/ast.c index ddbffb9..dbb2012 100644 --- 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; }