summaryrefslogtreecommitdiffstats
path: root/lua-5.3.4-bug1.patch
blob: f03aab92a27625b47dd60b00aa708caec7da6fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
diff -up lua-5.3.4/src/lparser.c.bug1 lua-5.3.4/src/lparser.c
--- lua-5.3.4/src/lparser.c.bug1	2017-08-02 16:03:43.730247916 -0400
+++ lua-5.3.4/src/lparser.c	2017-08-02 16:03:56.507957260 -0400
@@ -1392,7 +1392,7 @@ static void test_then_block (LexState *l
     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 */