[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.1 (rc2) now available
- From: Alexander Gavrilov <angavrilov@...>
- Date: Thu, 31 May 2012 13:24:18 +0400
Hi,
It seems this fix from the end of my stack overflow email still
isn't applied. Without it relative value of idx doesn't work.
-------------------------- src/lauxlib.c --------------------------
@@ -863,8 +863,8 @@ LUALIB_API int luaL_getsubtable (lua_State *L, int idx, const char *fname) {
lua_getfield(L, idx, fname);
if (lua_istable(L, -1)) return 1; /* table already there */
else {
- idx = lua_absindex(L, idx);
lua_pop(L, 1); /* remove previous result */
+ idx = lua_absindex(L, idx);
lua_newtable(L);
lua_pushvalue(L, -1); /* copy to be left at top */
lua_setfield(L, idx, fname); /* assign new table to field */
Alexander