summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os_win32.c6
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 7c2051f7f3..9b692ec0e9 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -6411,7 +6411,9 @@ mch_write(
return;
# endif
- s[len] = NUL;
+ // 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;
diff --git a/src/version.c b/src/version.c
index 834196d83b..54bf127614 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2787,
+/**/
2786,
/**/
2785,