Mercurial > vim
comparison src/structs.h @ 18572:23fef64352a1 v8.1.2280
patch 8.1.2280: crash when passing partial to substitute()
Commit: https://github.com/vim/vim/commit/b0745b221d284e381f1bd4b591cd68ea54b6a51d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 9 22:28:11 2019 +0100
patch 8.1.2280: crash when passing partial to substitute()
Problem: Crash when passing partial to substitute().
Solution: Take extra arguments into account. (closes https://github.com/vim/vim/issues/5186)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 09 Nov 2019 22:30:04 +0100 |
parents | e5ef5d820b5b |
children | 8b0114ffde2b |
comparison
equal
deleted
inserted
replaced
18571:e268594d460a | 18572:23fef64352a1 |
---|---|
1625 | 1625 |
1626 // Struct passed between functions dealing with function call execution. | 1626 // Struct passed between functions dealing with function call execution. |
1627 // | 1627 // |
1628 // "argv_func", when not NULL, can be used to fill in arguments only when the | 1628 // "argv_func", when not NULL, can be used to fill in arguments only when the |
1629 // invoked function uses them. It is called like this: | 1629 // invoked function uses them. It is called like this: |
1630 // new_argcount = argv_func(current_argcount, argv, called_func_argcount) | 1630 // new_argcount = argv_func(current_argcount, argv, partial_argcount, |
1631 // called_func_argcount) | |
1631 // | 1632 // |
1632 typedef struct { | 1633 typedef struct { |
1633 int (* argv_func)(int, typval_T *, int); | 1634 int (* argv_func)(int, typval_T *, int, int); |
1634 linenr_T firstline; // first line of range | 1635 linenr_T firstline; // first line of range |
1635 linenr_T lastline; // last line of range | 1636 linenr_T lastline; // last line of range |
1636 int *doesrange; // if not NULL: return: function handled range | 1637 int *doesrange; // if not NULL: return: function handled range |
1637 int evaluate; // actually evaluate expressions | 1638 int evaluate; // actually evaluate expressions |
1638 partial_T *partial; // for extra arguments | 1639 partial_T *partial; // for extra arguments |