From: Thierry FOURNIER Date: Fri, 13 Mar 2015 11:21:07 +0000 (+0100) Subject: BUG/MINOR: lua: error in detection of mandatory arguments X-Git-Tag: v1.6-dev2~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd6f4b43e23238db85aae22a05335bee7122a435;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/hlua.c b/src/hlua.c index d1086c7241..1c239e5219 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; }