Browse Source

small bug: previous call may change `base'

Roberto Ierusalimschy 23 years ago
parent
commit
84488c5670
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lvm.c

+ 3 - 2
lvm.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lvm.c,v 1.266 2002/11/21 15:16:04 roberto Exp roberto $
+** $Id: lvm.c,v 1.267 2002/11/21 15:46:44 roberto Exp roberto $
 ** Lua virtual machine
 ** Lua virtual machine
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -552,7 +552,8 @@ StkId luaV_execute (lua_State *L) {
         int b = GETARG_B(i);
         int b = GETARG_B(i);
         int c = GETARG_C(i);
         int c = GETARG_C(i);
         luaV_concat(L, c-b+1, c);  /* may change `base' (and `ra') */
         luaV_concat(L, c-b+1, c);  /* may change `base' (and `ra') */
-        setobjs2s(XRA(i), base+b);
+        base = L->base;
+        setobjs2s(RA(i), base+b);
         luaC_checkGC(L);
         luaC_checkGC(L);
         break;
         break;
       }
       }