aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-08-04 15:27:57 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-08-04 15:27:57 -0300
commitee5d03b42af9831d7a3e64d05500b99018d53692 (patch)
treed6fd4afa929ed531452fc635ed020fce0c2101c2
parent323f33d0148a385e98a15a2ad00c41d40c9f297b (diff)
downloadlua-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldblib.c b/ldblib.c
index f3600445..f97530c9 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -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
47static int db_getfenv (lua_State *L) { 47static 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}