Patch 8.2.2787

5 views
Skip to first unread message

Bram Moolenaar

unread,
Apr 20, 2021, 4:37:06 AM4/20/21
to vim...@googlegroups.com

Patch 8.2.2787
Problem: MS-Windows: crash when using :echoconsole.
Solution: Do not write a NUL when it's already there.
Files: src/os_win32.c


*** ../vim-8.2.2786/src/os_win32.c 2021-02-01 20:50:33.810374133 +0100
--- src/os_win32.c 2021-04-20 10:31:50.881574422 +0200
***************
*** 6411,6417 ****
return;
# endif

! s[len] = NUL;

if (!term_console)
{
--- 6411,6419 ----
return;
# endif

! // Avoid writing to a string literal.
! if (s[len] != NUL)
! s[len] = NUL;

if (!term_console)
{
***************
*** 6433,6439 ****
return;
}

! while((ch = s[++prefix]))
if (ch <= 0x1e && !(ch != '\n' && ch != '\r' && ch != '\b'
&& ch != '\a' && ch != '\033'))
break;
--- 6435,6441 ----
return;
}

! while ((ch = s[++prefix]))
if (ch <= 0x1e && !(ch != '\n' && ch != '\r' && ch != '\b'
&& ch != '\a' && ch != '\033'))
break;
*** ../vim-8.2.2786/src/version.c 2021-04-19 21:06:27.454353644 +0200
--- src/version.c 2021-04-20 10:33:10.417442844 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2787,
/**/

--
hundred-and-one symptoms of being an internet addict:
126. You brag to all of your friends about your date Saturday night...but
you don't tell them it was only in a chat room.

/// 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