Patch 8.2.3674

4 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 25, 2021, 8:53:15 AM11/25/21
to vim...@googlegroups.com

Patch 8.2.3674
Problem: When ml_get_buf() fails it messes up IObuff.
Solution: Return a local pointer. (closes #9214)
Files: src/memline.c


*** ../vim-8.2.3673/src/memline.c 2021-10-19 22:12:21.936582330 +0100
--- src/memline.c 2021-11-25 13:52:07.223678254 +0000
***************
*** 2606,2611 ****
--- 2606,2612 ----
bhdr_T *hp;
DATA_BL *dp;
static int recursive = 0;
+ static char_u questions[4];

if (lnum > buf->b_ml.ml_line_count) // invalid line number
{
***************
*** 2618,2626 ****
--recursive;
}
errorret:
! STRCPY(IObuff, "???");
buf->b_ml.ml_line_len = 4;
! return IObuff;
}
if (lnum <= 0) // pretend line 0 is line 1
lnum = 1;
--- 2619,2627 ----
--recursive;
}
errorret:
! STRCPY(questions, "???");
buf->b_ml.ml_line_len = 4;
! return questions;
}
if (lnum <= 0) // pretend line 0 is line 1
lnum = 1;
*** ../vim-8.2.3673/src/version.c 2021-11-25 13:39:22.595524952 +0000
--- src/version.c 2021-11-25 13:52:18.387677464 +0000
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3674,
/**/

--
Lawmakers made it obligatory for everybody to take at least one bath
each week -- on Saturday night.
[real standing law in Vermont, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages