commit ee5d03b42af9831d7a3e64d05500b99018d53692
parent 323f33d0148a385e98a15a2ad00c41d40c9f297b
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 4 Aug 2009 15:27:33 -0300
small bug: debug.getfenv should check whether it has an argument
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ldblib.c b/ldblib.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldblib.c,v 1.109 2008/01/21 13:37:08 roberto Exp roberto $
+** $Id: ldblib.c,v 1.110 2009/02/17 13:21:28 roberto Exp roberto $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
@@ -45,6 +45,7 @@ static int db_setmetatable (lua_State *L) {
static int db_getfenv (lua_State *L) {
+ luaL_checkany(L, 1);
lua_getfenv(L, 1);
return 1;
}