]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Add an error output in the ast where I missed one (there are probably more places...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 10:45:29 +0000 (12:45 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 10:45:29 +0000 (12:45 +0200)
ast.c

diff --git a/ast.c b/ast.c
index d8bd293d451b5e6671a495ec188190c004055237..e4d18592b8d0b6480194eefe1c1485b0d676c58a 100644 (file)
--- 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;