mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
endlessloops don't have any other block which could be a continue-target-block, so use the body itself to not continue to NULL
This commit is contained in:
parent
23e0637e85
commit
0564e701c0
1 changed files with 2 additions and 0 deletions
2
ast.c
2
ast.c
|
@ -2401,6 +2401,8 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
|
||||||
old_bcontinue = func->continueblock;
|
old_bcontinue = func->continueblock;
|
||||||
func->breakblock = bbreak;
|
func->breakblock = bbreak;
|
||||||
func->continueblock = bcontinue;
|
func->continueblock = bcontinue;
|
||||||
|
if (!func->continueblock)
|
||||||
|
func->continueblock = bbody;
|
||||||
|
|
||||||
/* generate */
|
/* generate */
|
||||||
cgen = self->body->expression.codegen;
|
cgen = self->body->expression.codegen;
|
||||||
|
|
Loading…
Reference in a new issue