ports/lang/lua53/files/patch-src__lparser.c
Thomas Zander 0779926ea3 Fix multiple runtime errors and crashes in lua 5.3.4
Details
- Import upstream patches for known runtime errors
  and crashes in lua 5.3.4
  Details, see https://www.lua.org/bugs.html
  in the section on version 5.3.4

PR:		222581
Submitted by:	russ.haley@gmail.com
Approved by:	maintainer timeout
MFH:		2017Q4
2017-11-11 12:48:53 +00:00

12 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 */