diff options
Diffstat (limited to 'lbaselib.c')
| -rw-r--r-- | lbaselib.c | 8 |
1 files changed, 3 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.319 2018/02/05 17:10:52 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.320 2018/02/25 12:48:16 roberto Exp roberto $ |
| 3 | ** Basic library | 3 | ** Basic library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -171,8 +171,7 @@ static int luaB_rawset (lua_State *L) { | |||
| 171 | 171 | ||
| 172 | 172 | ||
| 173 | static int luaB_keyin (lua_State *L) { | 173 | static int luaB_keyin (lua_State *L) { |
| 174 | luaL_checktype(L, 1, LUA_TTABLE); | 174 | luaL_checkany(L, 2); /* ensures a first argument too */ |
| 175 | luaL_checkany(L, 2); | ||
| 176 | lua_settop(L, 2); | 175 | lua_settop(L, 2); |
| 177 | lua_pushboolean(L, lua_keyin(L, 1)); | 176 | lua_pushboolean(L, lua_keyin(L, 1)); |
| 178 | return 1; | 177 | return 1; |
| @@ -180,8 +179,7 @@ static int luaB_keyin (lua_State *L) { | |||
| 180 | 179 | ||
| 181 | 180 | ||
| 182 | static int luaB_removekey (lua_State *L) { | 181 | static int luaB_removekey (lua_State *L) { |
| 183 | luaL_checktype(L, 1, LUA_TTABLE); | 182 | luaL_checkany(L, 2); /* ensures a first argument too */ |
| 184 | luaL_checkany(L, 2); | ||
| 185 | lua_settop(L, 2); | 183 | lua_settop(L, 2); |
| 186 | lua_removekey(L, 1); | 184 | lua_removekey(L, 1); |
| 187 | return 0; | 185 | return 0; |
