]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
ast_loop must end by entering the outgoing block
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 4 May 2012 10:01:53 +0000 (12:01 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 4 May 2012 10:01:53 +0000 (12:01 +0200)
ast.c

diff --git a/ast.c b/ast.c
index e7962156f6775372401b7d450225b925f136cf1f..ce89fc905283d54f7e95f2cca21349034c9c1859 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1076,6 +1076,9 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
         end_bincrement = func->curblock;
     }
 
+    /* In any case now, we continue from the outgoing block */
+    func->curblock = bout;
+
     /* Now all blocks are in place */
     /* From 'bin' we jump to whatever comes first */
     if (bprecond       && !ir_block_create_jump(bin, bprecond))