0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 7.4.2051

Problem:    No proper testing of trunc_string().
Solution:   Add a unittest for message.c.
This commit is contained in:
Bram Moolenaar
2016-07-16 19:50:13 +02:00
parent 015102e91e
commit 502ae4ba63
7 changed files with 419 additions and 302 deletions

View File

@@ -260,7 +260,7 @@ trunc_string(
return;
}
n = ptr2cells(s + e);
if (len + n >= half)
if (len + n > half)
break;
len += n;
buf[e] = s[e];