diff options
-rw-r--r-- | inout.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5,7 +5,7 @@ | |||
5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | char *rcs_inout="$Id: inout.c,v 2.64 1997/06/19 18:04:34 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.65 1997/06/19 18:49:40 roberto Exp roberto $"; |
9 | 9 | ||
10 | #include <stdio.h> | 10 | #include <stdio.h> |
11 | #include <string.h> | 11 | #include <string.h> |
@@ -152,6 +152,8 @@ static void lua_internaldostring (void) | |||
152 | { | 152 | { |
153 | lua_Object err = lua_getparam(2); | 153 | lua_Object err = lua_getparam(2); |
154 | if (err != LUA_NOOBJECT) { /* set new error method */ | 154 | if (err != LUA_NOOBJECT) { /* set new error method */ |
155 | luaL_arg_check(lua_isnil(err) || lua_isfunction(err), 2, | ||
156 | "must be a valid error handler"); | ||
155 | lua_pushobject(err); | 157 | lua_pushobject(err); |
156 | err = lua_seterrormethod(); | 158 | err = lua_seterrormethod(); |
157 | } | 159 | } |