소스 검색

[lua] fix labeling of continue variables

Justin Donaldson 8 년 전
부모
커밋
718c009aba
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/generators/genlua.ml

+ 1 - 1
src/generators/genlua.ml

@@ -472,10 +472,10 @@ and gen_loop ctx label cond e =
     let old_handle_continue = ctx.handle_continue in
     let will_continue = has_continue e in
     ctx.handle_continue <- has_continue e;
+    ctx.break_depth <- ctx.break_depth + 1;
     if will_continue then begin
         println ctx "local _hx_continue_%i = false;" ctx.break_depth;
     end;
-    ctx.break_depth <- ctx.break_depth + 1;
     print ctx "%s " label;
     gen_cond ctx cond;
     print ctx " do ";