patch 9.0.0476: varargs does not work for replacement function of substitute()
Problem: Varargs does not work for replacement function of substitute().
Solution: Check the varargs flag of the function. (closes #11142)
diff --git a/src/userfunc.c b/src/userfunc.c
index 1412caa..35ce3f3 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3644,7 +3644,7 @@
if (funcexe->fe_argv_func != NULL)
// postponed filling in the arguments, do it now
argcount = funcexe->fe_argv_func(argcount, argvars,
- argv_clear, fp->uf_args.ga_len);
+ argv_clear, fp);
if (funcexe->fe_basetv != NULL)
{