lua-users home
lua-l archive

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


Oops... Fixed:

static int luaB_unpack (lua_State *L) {
  int n, i;
  luaL_checktype(L, 1, LUA_TTABLE);
  i = luaL_optint(L, 2, 1);
  n = luaL_optint(L, 3, luaL_getn(L, 1));
  luaL_checkstack(L, n, "table too big to unpack");
  for (; i<=n; i++)  /* push arg[1...n] */
    lua_rawgeti(L, 1, i);
  return n;
}


Had to adjust the for-loop there.

--
// Chris