diff options
| -rw-r--r-- | ldblib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldblib.c,v 1.73 2002/11/25 17:47:13 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.74 2002/12/04 17:38:31 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 | */ |
| @@ -155,7 +155,7 @@ static int sethook (lua_State *L) { | |||
| 155 | } | 155 | } |
| 156 | else { | 156 | else { |
| 157 | const char *smask = luaL_checkstring(L, 2); | 157 | const char *smask = luaL_checkstring(L, 2); |
| 158 | lua_Number count = luaL_optnumber(L, 3, 0); | 158 | int count = luaL_optint(L, 3, 0); |
| 159 | luaL_checktype(L, 1, LUA_TFUNCTION); | 159 | luaL_checktype(L, 1, LUA_TFUNCTION); |
| 160 | lua_sethook(L, hookf, makemask(smask, count), count); | 160 | lua_sethook(L, hookf, makemask(smask, count), count); |
| 161 | } | 161 | } |
