From: Wolfgang (Blub) Bumiller Date: Mon, 17 Dec 2012 14:43:14 +0000 (+0100) Subject: Fix: check error before calling codegen_output_type X-Git-Tag: 0.1.9~93 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eab1050ba4034442708292e7879cd34ed7371681;p=xonotic%2Fgmqcc.git Fix: check error before calling codegen_output_type --- diff --git a/ast.c b/ast.c index 993ef38..bdb9408 100644 --- a/ast.c +++ b/ast.c @@ -2002,7 +2002,9 @@ bool ast_entfield_codegen(ast_entfield *self, ast_function *func, bool lvalue, i } else { *out = ir_block_create_load_from_ent(func->curblock, ast_ctx(self), ast_function_label(func, "efv"), ent, field, self->expression.vtype); + /* Done AFTER error checking: codegen_output_type(self, *out); + */ } if (!*out) { compile_error(ast_ctx(self), "failed to create %s instruction (output type %s)", @@ -2010,6 +2012,8 @@ bool ast_entfield_codegen(ast_entfield *self, ast_function *func, bool lvalue, i type_name[self->expression.vtype]); return false; } + if (!lvalue) + codegen_output_type(self, *out); if (lvalue) self->expression.outl = *out;