diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/honey_lua.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/honey_lua.c b/src/honey_lua.c index 307f4c6..1d199c2 100644 --- a/src/honey_lua.c +++ b/src/honey_lua.c @@ -263,9 +263,12 @@ void honey_lua_parse_params(lua_State* L, int n, int m, ...) void* data = va_arg(args, void*); lua_getfield(L, table_index, param); - if (lua_isnil(L, -1) && n < m) - honey_lua_throw_error - (L, "required parameter '%s' was not found in param table!", param); + if (lua_isnil(L, -1)) { + if (n < m) + honey_lua_throw_error + (L, "required parameter '%s' was not found in param table!", param); + continue; + } if (!check_argument(L, type, -1)) honey_lua_throw_error |