shithub: libmujs

Download patch

ref: dd9217c6a0e06ae211e9f5db60dcb14d61295a76
parent: f725c8cf9285dd3775292d2c177c8191b07afb46
author: Tor Andersson <tor@ccxvii.net>
date: Wed Feb 5 08:14:34 EST 2014

Fix bug where do/while continue statement jumped to the wrong location.

--- a/jscompile.c
+++ b/jscompile.c
@@ -862,9 +862,10 @@
 	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: