aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ldblib.c b/ldblib.c
index 10328f3a..09e1c252 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.135 2013/07/22 16:05:53 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.136 2014/02/19 13:51:09 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*/
@@ -270,8 +270,7 @@ static void hookf (lua_State *L, lua_Debug *ar) {
270 {"call", "return", "line", "count", "tail call"}; 270 {"call", "return", "line", "count", "tail call"};
271 gethooktable(L); 271 gethooktable(L);
272 lua_pushthread(L); 272 lua_pushthread(L);
273 lua_rawget(L, -2); 273 if (lua_rawget(L, -2) == LUA_TFUNCTION) {
274 if (lua_isfunction(L, -1)) {
275 lua_pushstring(L, hooknames[(int)ar->event]); 274 lua_pushstring(L, hooknames[(int)ar->event]);
276 if (ar->currentline >= 0) 275 if (ar->currentline >= 0)
277 lua_pushinteger(L, ar->currentline); 276 lua_pushinteger(L, ar->currentline);