opnsense-ports/lang/lua53/files/patch-src__lparser.c
Franco Fichtner 4a33d3ced4 lang/lua53: sync with upstream
Taken from: HardenedBSD
2017-11-18 07:44:39 +01:00

11 lines
580 B
C

--- src/lparser.c.orig 2016-08-01 19:51:24 UTC
+++ src/lparser.c
@@ -1392,7 +1392,7 @@ static void test_then_block (LexState *ls, int *escape
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 semicolons */
if (block_follow(ls, 0)) { /* 'goto' is the entire block? */
leaveblock(fs);
return; /* and that is it */