Browse Source

fixed continue in do...while.

Nicolas Cannasse 19 years ago
parent
commit
466c540361
1 changed files with 2 additions and 1 deletions
  1. 2 1
      genswf8.ml

+ 2 - 1
genswf8.ml

@@ -918,9 +918,10 @@ and gen_expr_2 ctx retval e =
 		let loop_end = begin_loop ctx in
 		let loop_end = begin_loop ctx in
 		let p = pos ctx in
 		let p = pos ctx in
 		gen_expr ctx false e;
 		gen_expr ctx false e;
+		let cont_pos = ctx.code_pos in
 		gen_expr ctx true cond;
 		gen_expr ctx true cond;
 		p true;
 		p true;
-		loop_end ctx.code_pos
+		loop_end cont_pos
 	| TReturn None ->
 	| TReturn None ->
 		pop ctx (ctx.stack_size - ctx.fun_stack) false;
 		pop ctx (ctx.stack_size - ctx.fun_stack) false;
 		write ctx (APush [PUndefined]);
 		write ctx (APush [PUndefined]);