Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/lua/dist/src Fix a bug that gerenates wrong cod...



details:   https://anonhg.NetBSD.org/src/rev/8be806e0ecb8
branches:  trunk
changeset: 823746:8be806e0ecb8
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sun May 07 08:14:06 2017 +0000

description:
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:

 external/mit/lua/dist/src/lparser.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e131adff0cd8 -r 8be806e0ecb8 external/mit/lua/dist/src/lparser.c
--- a/external/mit/lua/dist/src/lparser.c       Sun May 07 05:50:39 2017 +0000
+++ b/external/mit/lua/dist/src/lparser.c       Sun May 07 08:14:06 2017 +0000
@@ -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 @@
     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 */



Home | Main Index | Thread Index | Old Index