diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-11 12:51:08 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-11 12:51:08 -0300 |
commit | 6bfef60e77f5eec1057470010b4179ee6f830fe6 (patch) | |
tree | 49454e412c34c5d5d88e5321456bbeadc15ee046 /lbaselib.c | |
parent | 370d31a5593220723d222dec6e3e4019decc3309 (diff) | |
download | lua-6bfef60e77f5eec1057470010b4179ee6f830fe6.tar.gz lua-6bfef60e77f5eec1057470010b4179ee6f830fe6.tar.bz2 lua-6bfef60e77f5eec1057470010b4179ee6f830fe6.zip |
bug: rawset/rawget do not ignore extra arguments
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.168 2005/02/23 17:30:22 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.169 2005/02/28 17:24:41 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 | */ |
@@ -164,6 +164,7 @@ static int luaB_rawequal (lua_State *L) { | |||
164 | static int luaB_rawget (lua_State *L) { | 164 | static int luaB_rawget (lua_State *L) { |
165 | luaL_checktype(L, 1, LUA_TTABLE); | 165 | luaL_checktype(L, 1, LUA_TTABLE); |
166 | luaL_checkany(L, 2); | 166 | luaL_checkany(L, 2); |
167 | lua_settop(L, 2); | ||
167 | lua_rawget(L, 1); | 168 | lua_rawget(L, 1); |
168 | return 1; | 169 | return 1; |
169 | } | 170 | } |
@@ -172,6 +173,7 @@ static int luaB_rawset (lua_State *L) { | |||
172 | luaL_checktype(L, 1, LUA_TTABLE); | 173 | luaL_checktype(L, 1, LUA_TTABLE); |
173 | luaL_checkany(L, 2); | 174 | luaL_checkany(L, 2); |
174 | luaL_checkany(L, 3); | 175 | luaL_checkany(L, 3); |
176 | lua_settop(L, 3); | ||
175 | lua_rawset(L, 1); | 177 | lua_rawset(L, 1); |
176 | return 1; | 178 | return 1; |
177 | } | 179 | } |