Problem: MS-Windows: crash when using :echoconsole.
Solution: Do not write a NUL when it's already there.
return;
# endif
- s[len] = NUL;
+ // Avoid writing to a string literal.
+ if (s[len] != NUL)
+ s[len] = NUL;
if (!term_console)
{
return;
}
- while((ch = s[++prefix]))
+ while ((ch = s[++prefix]))
if (ch <= 0x1e && !(ch != '\n' && ch != '\r' && ch != '\b'
&& ch != '\a' && ch != '\033'))
break;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2787,
/**/
2786,
/**/