From 0564e701c083aca113c77b7aa1ec716f4db82f00 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 25 Nov 2012 23:50:42 +0100 Subject: [PATCH] endlessloops don't have any other block which could be a continue-target-block, so use the body itself to not continue to NULL --- ast.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ast.c b/ast.c index ba98f51..bd67638 100644 --- 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; + if (!func->continueblock) + func->continueblock = bbody; /* generate */ cgen = self->body->expression.codegen; -- 2.39.2