From 61513a21b7ddde49638e33c88259c620804b2231 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Wed, 30 Oct 2024 00:04:19 +0100 Subject: [PATCH] Fix do while loops on lua --- src/generators/genlua.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generators/genlua.ml b/src/generators/genlua.ml index cab664cb4d6..445e118bdbd 100644 --- a/src/generators/genlua.ml +++ b/src/generators/genlua.ml @@ -585,9 +585,9 @@ and gen_loop ctx cond do_while e = println ctx "local _hx_do_first_%i = true;" ctx.break_depth; let b = open_block ctx in print ctx "while "; - gen_cond ctx cond; if do_while then - print ctx " or _hx_do_first_%i" ctx.break_depth; + print ctx "_hx_do_first_%i or " ctx.break_depth; + gen_cond ctx cond; print ctx " do "; if do_while then begin newline ctx;