From b0745b221d284e381f1bd4b591cd68ea54b6a51d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 9 Nov 2019 22:28:11 +0100 Subject: patch 8.1.2280: crash when passing partial to substitute() Problem: Crash when passing partial to substitute(). Solution: Take extra arguments into account. (closes #5186) --- src/structs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/structs.h') diff --git a/src/structs.h b/src/structs.h index fd3a1d072..69dc7825e 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1627,10 +1627,11 @@ typedef struct // // "argv_func", when not NULL, can be used to fill in arguments only when the // invoked function uses them. It is called like this: -// new_argcount = argv_func(current_argcount, argv, called_func_argcount) +// new_argcount = argv_func(current_argcount, argv, partial_argcount, +// called_func_argcount) // typedef struct { - int (* argv_func)(int, typval_T *, int); + int (* argv_func)(int, typval_T *, int, int); linenr_T firstline; // first line of range linenr_T lastline; // last line of range int *doesrange; // if not NULL: return: function handled range -- cgit v1.2.1