Commit 10a4af70 authored by Nan Xiao's avatar Nan Xiao Committed by Brenden Blanco

Since LUA_GLOBALSINDEX is obsolete from Lua 5.2, use lua_getglobal function

instead.
parent 4870819a
......@@ -68,7 +68,7 @@ static int report(lua_State *L, int status) {
static int traceback(lua_State *L) {
if (!lua_isstring(L, 1)) /* 'message' not a string? */
return 1; /* keep it intact */
lua_getfield(L, LUA_GLOBALSINDEX, "debug");
lua_getglobal(L, "debug");
if (!lua_istable(L, -1)) {
lua_pop(L, 1);
return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment