]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
endlessloops don't have any other block which could be a continue-target-block, so...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 22:50:42 +0000 (23:50 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 22:50:42 +0000 (23:50 +0100)
ast.c

diff --git a/ast.c b/ast.c
index ba98f51d943278f3202cd98b6b9456c2b4b8aa25..bd67638f1f2b0625bc95d7739225cb796b6b6ae5 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -2401,6 +2401,8 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
         old_bcontinue       = func->continueblock;
         func->breakblock    = bbreak;
         func->continueblock = bcontinue;
         old_bcontinue       = func->continueblock;
         func->breakblock    = bbreak;
         func->continueblock = bcontinue;
+        if (!func->continueblock)
+            func->continueblock = bbody;
 
         /* generate */
         cgen = self->body->expression.codegen;
 
         /* generate */
         cgen = self->body->expression.codegen;