diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-08-04 15:27:57 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-08-04 15:27:57 -0300 |
commit | ee5d03b42af9831d7a3e64d05500b99018d53692 (patch) | |
tree | d6fd4afa929ed531452fc635ed020fce0c2101c2 | |
parent | 323f33d0148a385e98a15a2ad00c41d40c9f297b (diff) | |
download | lua-ee5d03b42af9831d7a3e64d05500b99018d53692.tar.gz lua-ee5d03b42af9831d7a3e64d05500b99018d53692.tar.bz2 lua-ee5d03b42af9831d7a3e64d05500b99018d53692.zip |
small bug: debug.getfenv should check whether it has an argument
-rw-r--r-- | ldblib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldblib.c,v 1.109 2008/01/21 13:37:08 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.110 2009/02/17 13:21:28 roberto Exp roberto $ |
3 | ** Interface from Lua to its debug API | 3 | ** Interface from Lua to its debug API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -45,6 +45,7 @@ static int db_setmetatable (lua_State *L) { | |||
45 | 45 | ||
46 | 46 | ||
47 | static int db_getfenv (lua_State *L) { | 47 | static int db_getfenv (lua_State *L) { |
48 | luaL_checkany(L, 1); | ||
48 | lua_getfenv(L, 1); | 49 | lua_getfenv(L, 1); |
49 | return 1; | 50 | return 1; |
50 | } | 51 | } |