lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,
lua_gettable(L, index) does not use the key at the top of stack.  It 
assumes the key to be in the stack position just above the table's 
position.  The offending code snippet is below :

const TObject *luaV_gettable (lua_State *L, StkId t) {
..
..
..
    /* do a primitive get */
    const TObject *h = luaH_get(L, hvalue(t), t+1);


if the (t+1) argument is changed to (L->top-1), the problem is 
corrected.

Regards,
Philip Yi