aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-04-29 15:09:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-04-29 15:09:17 -0300
commit5ecb31003f8086f057444468d0356771526ec7b4 (patch)
tree49249bc555b2fbb66e106941d203c845add13c97 /lparser.c
parenta454e884e0b6657dd34c6dc36732d0e70ade35e8 (diff)
downloadlua-5ecb31003f8086f057444468d0356771526ec7b4.tar.gz
lua-5ecb31003f8086f057444468d0356771526ec7b4.tar.bz2
lua-5ecb31003f8086f057444468d0356771526ec7b4.zip
bug: cannot "skip" labels after if-goto before the jump over the
'then' part
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lparser.c b/lparser.c
index f78f64bd..af5891c2 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.156 2017/04/20 19:53:55 roberto Exp roberto $ 2** $Id: lparser.c,v 2.157 2017/04/28 20:57:45 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1400,7 +1400,7 @@ static void test_then_block (LexState *ls, int *escapelist) {
1400 luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */ 1400 luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */
1401 enterblock(fs, &bl, 0); /* must enter block before 'goto' */ 1401 enterblock(fs, &bl, 0); /* must enter block before 'goto' */
1402 gotostat(ls, v.t); /* handle goto/break */ 1402 gotostat(ls, v.t); /* handle goto/break */
1403 skipnoopstat(ls); /* skip other no-op statements */ 1403 while (testnext(ls, ';')) {} /* skip colons */
1404 if (block_follow(ls, 0)) { /* 'goto' is the entire block? */ 1404 if (block_follow(ls, 0)) { /* 'goto' is the entire block? */
1405 leaveblock(fs); 1405 leaveblock(fs);
1406 return; /* and that is it */ 1406 return; /* and that is it */