[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: unpack segfault
- From: "Patrick Donnelly" <batrick.donnelly@...>
- Date: Tue, 12 Feb 2008 17:11:58 -0700
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> return unpack({1,2,3}, 2^31-1, 2^31-1)
Segmentation fault
Patch below:
--- lbaselib.c.old 2008-02-12 17:06:51.000000000 -0700
+++ lbaselib.c 2008-02-12 17:09:03.000000000 -0700
@@ -340,7 +340,7 @@
static int luaB_unpack (lua_State *L) {
- int i, e, n;
+ unsigned int i, e, n;
luaL_checktype(L, 1, LUA_TTABLE);
i = luaL_optint(L, 2, 1);
e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1));
--
-Patrick Donnelly
"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."
-Will Durant