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 bug 1 reported on www.lua.org/...



details:   https://anonhg.NetBSD.org/src/rev/0af126e6cf2a
branches:  trunk
changeset: 817779:0af126e6cf2a
user:      salazar <salazar%NetBSD.org@localhost>
date:      Thu Sep 08 02:53:39 2016 +0000

description:
fix bug 1 reported on www.lua.org/bugs.html

diffstat:

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

diffs (31 lines):

diff -r 65908e43aa61 -r 0af126e6cf2a external/mit/lua/dist/src/lparser.c
--- a/external/mit/lua/dist/src/lparser.c       Thu Sep 08 02:51:53 2016 +0000
+++ b/external/mit/lua/dist/src/lparser.c       Thu Sep 08 02:53:39 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lparser.c,v 1.6 2016/09/08 02:21:31 salazar Exp $      */
+/*     $NetBSD: lparser.c,v 1.7 2016/09/08 02:53:39 salazar Exp $      */
 
 /*
 ** Id: lparser.c,v 2.153 2016/05/13 19:10:16 roberto Exp 
@@ -327,6 +327,8 @@
       luaK_nil(fs, reg, extra);
     }
   }
+  if (nexps > nvars)
+    ls->fs->freereg -= nexps - nvars;  /* remove extra values */
 }
 
 
@@ -1174,11 +1176,8 @@
     int nexps;
     checknext(ls, '=');
     nexps = explist(ls, &e);
-    if (nexps != nvars) {
+    if (nexps != nvars)
       adjust_assign(ls, nvars, nexps, &e);
-      if (nexps > nvars)
-        ls->fs->freereg -= nexps - nvars;  /* remove extra values */
-    }
     else {
       luaK_setoneret(ls->fs, &e);  /* close last expression */
       luaK_storevar(ls->fs, &lh->v, &e);



Home | Main Index | Thread Index | Old Index