From: Wolfgang (Blub) Bumiller Date: Sat, 18 Aug 2012 10:45:29 +0000 (+0200) Subject: Add an error output in the ast where I missed one (there are probably more places... X-Git-Tag: 0.1-rc1~233 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a74b26a9bce11028b9db21424aa6f32c32fe7d8e;p=xonotic%2Fgmqcc.git Add an error output in the ast where I missed one (there are probably more places which need one) --- diff --git a/ast.c b/ast.c index d8bd293..e4d1859 100644 --- a/ast.c +++ b/ast.c @@ -1145,8 +1145,12 @@ bool ast_entfield_codegen(ast_entfield *self, ast_function *func, bool lvalue, i *out = ir_block_create_load_from_ent(func->curblock, ast_function_label(func, "efv"), ent, field, self->expression.vtype); } - if (!*out) + if (!*out) { + asterror(ast_ctx(self), "failed to create %s instruction (output type %s)", + (lvalue ? "ADDRESS" : "FIELD"), + type_name[self->expression.vtype]); return false; + } if (lvalue) self->expression.outl = *out;