[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: unpack segfault
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 13 Feb 2008 13:09:09 -0200
> Anyway, this has got to be the coolest bug I've ever seen. Here is a
> patch that I think squashes it for good:
>
> [...]
Isn't this last part enough to fix it?
> luaL_checkstack(L, n, "table too big to unpack");
> - for (; i<=e; i++) /* push arg[i...e] */
> + lua_rawgeti(L, 1, i);
> + for (; (i++)<e;) /* push arg[i...e] */
> lua_rawgeti(L, 1, i);
> return n;
> }
(PS: thanks for the report!)
-- Roberto