From dd6f4b43e23238db85aae22a05335bee7122a435 Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Fri, 13 Mar 2015 12:21:07 +0100 Subject: [PATCH] BUG/MINOR: lua: error in detection of mandatory arguments The last mandatory arguments in sample fetches or converters are ignored. This is due to a bad control. --- src/hlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hlua.c b/src/hlua.c index d1086c724..1c239e521 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -530,7 +530,7 @@ __LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp, /* Check for mandatory arguments. */ if (argp[idx].type == ARGT_STOP) { - if (idx + 1 < min_arg) + if (idx < min_arg) WILL_LJMP(luaL_argerror(L, first + idx, "Mandatory argument expected")); return 0; }