BUG/MEDIUM: lua: bad argument number in analyser and in error message
The first argument in the stack is 1 and not 0. So the analyzer
starts at bad argument number, and the error message contains
also bad argument number.
diff --git a/src/hlua.c b/src/hlua.c
index b23eb02..d59a462 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2564,7 +2564,7 @@
args[i].type = ARGT_STOP;
/* Check arguments. */
- MAY_LJMP(hlua_lua2arg_check(L, 1, args, f->arg_mask));
+ MAY_LJMP(hlua_lua2arg_check(L, 2, args, f->arg_mask, s->p));
/* Run the special args checker. */
if (f->val_args && !f->val_args(args, NULL)) {
@@ -2668,7 +2668,7 @@
args[i].type = ARGT_STOP;
/* Check arguments. */
- MAY_LJMP(hlua_lua2arg_check(L, 1, args, conv->arg_mask));
+ MAY_LJMP(hlua_lua2arg_check(L, 3, args, conv->arg_mask, sc->p));
/* Run the special args checker. */
if (conv->val_args && !conv->val_args(args, conv, "", 0, NULL)) {