mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-29 14:28:03 +00:00
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.
This commit is contained in:
parent
933e5deb2b
commit
dd6f4b43e2
@ -530,7 +530,7 @@ __LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp,
|
|||||||
|
|
||||||
/* Check for mandatory arguments. */
|
/* Check for mandatory arguments. */
|
||||||
if (argp[idx].type == ARGT_STOP) {
|
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"));
|
WILL_LJMP(luaL_argerror(L, first + idx, "Mandatory argument expected"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user