]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Don't check for is_return but for final at the end of a function so that if 'goto...
authorWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 20:05:29 +0000 (21:05 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 20:05:29 +0000 (21:05 +0100)
ast.c

diff --git a/ast.c b/ast.c
index 7fcab1538e4b12fe00db1b4dd034736841cffcbc..04e13b8e6d5f96eca84bdedb14b494776989ca3c 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1505,7 +1505,7 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir)
     }
 
     /* TODO: check return types */
-    if (!self->curblock->is_return)
+    if (!self->curblock->final)
     {
         if (!self->vtype->expression.next ||
             self->vtype->expression.next->expression.vtype == TYPE_VOID)