aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 5f7e6658..c48487da 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.196 2007/02/07 17:51:21 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.197 2007/02/09 12:40:21 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -343,7 +343,7 @@ static int luaB_unpack (lua_State *L) {
343 int i, e, n; 343 int i, e, n;
344 luaL_checktype(L, 1, LUA_TTABLE); 344 luaL_checktype(L, 1, LUA_TTABLE);
345 i = luaL_optint(L, 2, 1); 345 i = luaL_optint(L, 2, 1);
346 e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1)); 346 e = luaL_opt(L, luaL_checkint, 3, (int)lua_objlen(L, 1));
347 n = e - i + 1; /* number of elements */ 347 n = e - i + 1; /* number of elements */
348 if (n <= 0) return 0; /* empty range */ 348 if (n <= 0) return 0; /* empty range */
349 luaL_checkstack(L, n, "table too big to unpack"); 349 luaL_checkstack(L, n, "table too big to unpack");