forked from aniani/vim
patch 8.2.2787: MS-Windows: crash when using :echoconsole
Problem: MS-Windows: crash when using :echoconsole. Solution: Do not write a NUL when it's already there.
This commit is contained in:
@@ -6411,6 +6411,8 @@ mch_write(
|
||||
return;
|
||||
# endif
|
||||
|
||||
// Avoid writing to a string literal.
|
||||
if (s[len] != NUL)
|
||||
s[len] = NUL;
|
||||
|
||||
if (!term_console)
|
||||
@@ -6433,7 +6435,7 @@ mch_write(
|
||||
return;
|
||||
}
|
||||
|
||||
while((ch = s[++prefix]))
|
||||
while ((ch = s[++prefix]))
|
||||
if (ch <= 0x1e && !(ch != '\n' && ch != '\r' && ch != '\b'
|
||||
&& ch != '\a' && ch != '\033'))
|
||||
break;
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2787,
|
||||
/**/
|
||||
2786,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user