mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
vim-patch:7.4.2051
Problem: No proper testing of trunc_string().
Solution: Add a unittest for message.c.
502ae4ba63
This commit is contained in:
@@ -257,7 +257,7 @@ void trunc_string(char_u *s, char_u *buf, int room, int buflen)
|
||||
return;
|
||||
}
|
||||
n = ptr2cells(s + e);
|
||||
if (len + n >= half)
|
||||
if (len + n > half)
|
||||
break;
|
||||
len += n;
|
||||
buf[e] = s[e];
|
||||
|
Reference in New Issue
Block a user