diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-29 15:09:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-04-29 15:09:17 -0300 |
commit | 5ecb31003f8086f057444468d0356771526ec7b4 (patch) | |
tree | 49249bc555b2fbb66e106941d203c845add13c97 /lparser.c | |
parent | a454e884e0b6657dd34c6dc36732d0e70ade35e8 (diff) | |
download | lua-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |