diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-09 22:28:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-09 22:28:11 +0100 |
commit | b0745b221d284e381f1bd4b591cd68ea54b6a51d (patch) | |
tree | 7dcb9c03cfc28c3c84359d9f04ec2d41d1173f2c /src/userfunc.c | |
parent | dbd4316806389e3c2240b48cc6c4d209cb1665fd (diff) | |
download | vim-git-b0745b221d284e381f1bd4b591cd68ea54b6a51d.tar.gz |
patch 8.1.2280: crash when passing partial to substitute()v8.1.2280
Problem: Crash when passing partial to substitute().
Solution: Take extra arguments into account. (closes #5186)
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index 40eb14401..cfc52befe 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -1588,7 +1588,8 @@ call_func( else if (fp != NULL) { if (funcexe->argv_func != NULL) - argcount = funcexe->argv_func(argcount, argvars, + // postponed filling in the arguments, do it now + argcount = funcexe->argv_func(argcount, argvars, argv_clear, fp->uf_args.ga_len); if (funcexe->basetv != NULL) |