commit | dd6f4b43e23238db85aae22a05335bee7122a435 | [log] [tgz] |
---|---|---|
author | Thierry FOURNIER <tfournier@haproxy.com> | Fri Mar 13 12:21:07 2015 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Fri Mar 13 14:10:33 2015 +0100 |
tree | 9be10d24eb0687258709ec477338f3de2e90ef76 | |
parent | 933e5deb2b4fa73bb260a91aae94530ca6ead832 [diff] |
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 d1086c7..1c239e5 100644 --- a/src/hlua.c +++ b/src/hlua.c
@@ -530,7 +530,7 @@ /* 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; }