diff options
author | sanine-a <sanine.not@pm.me> | 2020-12-15 20:32:01 -0600 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-12-15 20:32:01 -0600 |
commit | 8f823ac7fc578e85415824220db3e06e01de0437 (patch) | |
tree | e54f619254192041593c34cb8b4fc15d1516d39b /src/honey_lua.c | |
parent | ecfd781f73e0ef78b4d6f8bd82b17a0348ce735a (diff) |
fix non-skipping bug in honey_lua_parse_params
Diffstat (limited to 'src/honey_lua.c')
-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 |