0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.4397: crash when using many composing characters in error message

Problem:    Crash when using many composing characters in error message.
Solution:   Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
This commit is contained in:
Bram Moolenaar
2022-02-16 12:16:19 +00:00
parent f5288c5895
commit 34f8117dec
3 changed files with 11 additions and 1 deletions

View File

@@ -101,7 +101,7 @@ ga_concat_shorten_esc(garray_T *gap, char_u *str)
{
same_len = 1;
s = p;
c = mb_ptr2char_adv(&s);
c = mb_cptr2char_adv(&s);
clen = s - p;
while (*s != NUL && c == mb_ptr2char(s))
{