diff options
| author | mbalmer <mbalmer@NetBSD.org> | 2017-05-07 08:14:06 +0000 |
|---|---|---|
| committer | mbalmer <mbalmer@NetBSD.org> | 2017-05-07 08:14:06 +0000 |
| commit | 5fc635253ffb6aa0b6d13dccf1ad3b5a2cdf7d6e (patch) | |
| tree | 9dde3548d4c46748993f45d1355db70f773ca903 /external/mit/lua | |
| parent | abe40ae7a0420ee5ca3ffb8537537466504d2bc6 (diff) | |
Fix a bug that gerenates wrong code for a goto followed by a label inside an
'if' (see https://www.lua.org/bugs.html).
Diffstat (limited to 'external/mit/lua')
| -rw-r--r-- | external/mit/lua/dist/src/lparser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/external/mit/lua/dist/src/lparser.c b/external/mit/lua/dist/src/lparser.c index 729bb09e149..7f630ed4817 100644 --- a/external/mit/lua/dist/src/lparser.c +++ b/external/mit/lua/dist/src/lparser.c @@ -1,4 +1,4 @@ -/* $NetBSD: lparser.c,v 1.9 2017/04/26 13:17:33 mbalmer Exp $ */ +/* $NetBSD: lparser.c,v 1.10 2017/05/07 08:14:06 mbalmer Exp $ */ /* ** Id: lparser.c,v 2.155 2016/08/01 19:51:24 roberto Exp @@ -1406,7 +1406,7 @@ static void test_then_block (LexState *ls, int *escapelist) { luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */ enterblock(fs, &bl, 0); /* must enter block before 'goto' */ gotostat(ls, v.t); /* handle goto/break */ - skipnoopstat(ls); /* skip other no-op statements */ + while (testnext(ls, ';')) {} /* skip colons */ if (block_follow(ls, 0)) { /* 'goto' is the entire block? */ leaveblock(fs); return; /* and that is it */ |
