From 146ed4a58cdf5c2c786f20aace4d20afd5802ba5 Mon Sep 17 00:00:00 2001 From: kramm Date: Fri, 2 Jan 2009 19:51:06 +0000 Subject: [PATCH 1/1] fixed bug in while(){continue}; --- lib/as3/parser.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/as3/parser.y b/lib/as3/parser.y index 1364b0e..0c6cfc1 100644 --- a/lib/as3/parser.y +++ b/lib/as3/parser.y @@ -1343,12 +1343,13 @@ WHILE : MAYBELABEL "while" '(' {new_state();} EXPRESSION ')' CODEBLOCK { code_t*myjmp = $$ = abc_jump($$, 0); code_t*loopstart = $$ = abc_label($$); $$ = code_append($$, $7); - myjmp->branch = $$ = abc_nop($$); + code_t*cont = $$ = abc_nop($$); + myjmp->branch = cont; $$ = code_append($$, $5.c); $$ = abc_iftrue($$, loopstart); code_t*out = $$ = abc_nop($$); breakjumpsto($$, $1, out); - continuejumpsto($$, $1, loopstart); + continuejumpsto($$, $1, cont); $$ = killvars($$); old_state(); -- 1.7.10.4