From dd9217c6a0e06ae211e9f5db60dcb14d61295a76 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 5 Feb 2014 13:14:34 +0100 Subject: [PATCH] Fix bug where do/while continue statement jumped to the wrong location. --- jscompile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jscompile.c b/jscompile.c index a0b09a4..631e0f0 100644 --- a/jscompile.c +++ b/jscompile.c @@ -862,9 +862,10 @@ static void cstm(JF, js_Ast *stm) case STM_DO: loop = here(J, F); cstm(J, F, stm->a); + cont = here(J, F); cexp(J, F, stm->b); jumpto(J, F, OP_JTRUE, loop); - labeljumps(J, F, stm->jumps, here(J,F), loop); + labeljumps(J, F, stm->jumps, here(J,F), cont); break; case STM_WHILE: