mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1491: Vim9: crash when compiling heredoc lines start with comment
Problem: Vim9: crash when compiling heredoc lines start with comment. Solution: Skip over NULL pointers. Do not remove comment and empty lines when fetching function lines. (closes #6743)
This commit is contained in:
@@ -612,7 +612,7 @@ do_cmdline_cmd(char_u *cmd)
|
||||
int
|
||||
do_cmdline(
|
||||
char_u *cmdline,
|
||||
char_u *(*fgetline)(int, void *, int, int),
|
||||
char_u *(*fgetline)(int, void *, int, getline_opt_T),
|
||||
void *cookie, // argument for fgetline()
|
||||
int flags)
|
||||
{
|
||||
@@ -638,7 +638,7 @@ do_cmdline(
|
||||
msglist_T *private_msg_list;
|
||||
|
||||
// "fgetline" and "cookie" passed to do_one_cmd()
|
||||
char_u *(*cmd_getline)(int, void *, int, int);
|
||||
char_u *(*cmd_getline)(int, void *, int, getline_opt_T);
|
||||
void *cmd_cookie;
|
||||
struct loop_cookie cmd_loop_cookie;
|
||||
void *real_cookie;
|
||||
@@ -1482,9 +1482,9 @@ free_cmdlines(garray_T *gap)
|
||||
*/
|
||||
int
|
||||
getline_equal(
|
||||
char_u *(*fgetline)(int, void *, int, int),
|
||||
char_u *(*fgetline)(int, void *, int, getline_opt_T),
|
||||
void *cookie UNUSED, // argument for fgetline()
|
||||
char_u *(*func)(int, void *, int, int))
|
||||
char_u *(*func)(int, void *, int, getline_opt_T))
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
char_u *(*gp)(int, void *, int, int);
|
||||
@@ -1512,7 +1512,7 @@ getline_equal(
|
||||
*/
|
||||
void *
|
||||
getline_cookie(
|
||||
char_u *(*fgetline)(int, void *, int, int) UNUSED,
|
||||
char_u *(*fgetline)(int, void *, int, getline_opt_T) UNUSED,
|
||||
void *cookie) // argument for fgetline()
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -1541,7 +1541,7 @@ getline_cookie(
|
||||
*/
|
||||
char_u *
|
||||
getline_peek(
|
||||
char_u *(*fgetline)(int, void *, int, int) UNUSED,
|
||||
char_u *(*fgetline)(int, void *, int, getline_opt_T) UNUSED,
|
||||
void *cookie) // argument for fgetline()
|
||||
{
|
||||
char_u *(*gp)(int, void *, int, int);
|
||||
|
Reference in New Issue
Block a user