[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaJIT-2.0.0-beta1
- From: Mike Pall <mikelu-0911@...>
- Date: Mon, 2 Nov 2009 21:37:47 +0100
Graham Wakefield wrote:
> Hope this is useful feedback: I've had consistent crashes with a rather
> large codebase, every time in lua_iscfunction() (sometimes but not always
> with negative indices).
Thanks for the report! Patch attached.
--Mike
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -202,7 +202,7 @@ LUA_API const char *lua_typename(lua_State *L, int t)
LUA_API int lua_iscfunction(lua_State *L, int idx)
{
cTValue *o = index2adr(L, idx);
- return !isluafunc(funcV(o));
+ return tvisfunc(o) && !isluafunc(funcV(o));
}
LUA_API int lua_isnumber(lua_State *L, int idx)