diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.278 2017/12/06 18:08:03 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.279 2017/12/08 17:28:25 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -980,6 +980,7 @@ LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, | |||
980 | func = 0; | 980 | func = 0; |
981 | else { | 981 | else { |
982 | StkId o = index2stack(L, errfunc); | 982 | StkId o = index2stack(L, errfunc); |
983 | api_check(L, ttisfunction(s2v(o)), "error handler must be a function"); | ||
983 | func = savestack(L, o); | 984 | func = savestack(L, o); |
984 | } | 985 | } |
985 | c.func = L->top - (nargs+1); /* function to be called */ | 986 | c.func = L->top - (nargs+1); /* function to be called */ |