diff options
Diffstat (limited to '')
| -rw-r--r-- | lbaselib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -185,7 +185,7 @@ static int luaB_globals (lua_State *L) { | |||
| 185 | static int luaB_rawget (lua_State *L) { | 185 | static int luaB_rawget (lua_State *L) { |
| 186 | luaL_check_type(L, 1, LUA_TTABLE); | 186 | luaL_check_type(L, 1, LUA_TTABLE); |
| 187 | luaL_check_any(L, 2); | 187 | luaL_check_any(L, 2); |
| 188 | lua_rawget(L, -2); | 188 | lua_rawget(L, 1); |
| 189 | return 1; | 189 | return 1; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| @@ -193,7 +193,7 @@ static int luaB_rawset (lua_State *L) { | |||
| 193 | luaL_check_type(L, 1, LUA_TTABLE); | 193 | luaL_check_type(L, 1, LUA_TTABLE); |
| 194 | luaL_check_any(L, 2); | 194 | luaL_check_any(L, 2); |
| 195 | luaL_check_any(L, 3); | 195 | luaL_check_any(L, 3); |
| 196 | lua_rawset(L, -3); | 196 | lua_rawset(L, 1); |
| 197 | return 1; | 197 | return 1; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| @@ -449,7 +449,7 @@ static int luaB_foreachi (lua_State *L) { | |||
| 449 | static int luaB_foreach (lua_State *L) { | 449 | static int luaB_foreach (lua_State *L) { |
| 450 | luaL_check_type(L, 1, LUA_TTABLE); | 450 | luaL_check_type(L, 1, LUA_TTABLE); |
| 451 | luaL_check_type(L, 2, LUA_TFUNCTION); | 451 | luaL_check_type(L, 2, LUA_TFUNCTION); |
| 452 | lua_pushnil(L); /* first index */ | 452 | lua_pushnil(L); /* first key */ |
| 453 | for (;;) { | 453 | for (;;) { |
| 454 | if (lua_next(L, 1) == 0) | 454 | if (lua_next(L, 1) == 0) |
| 455 | return 0; | 455 | return 0; |
