Skip to content

Commit

Permalink
Fix do while loops on lua
Browse files Browse the repository at this point in the history
  • Loading branch information
NeeEoo committed Oct 29, 2024
1 parent fe0d3e3 commit 61513a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generators/genlua.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 61513a2

Please sign in to comment.