diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-05 06:22:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 06:22:37 +0800 |
commit | d79e72621226cae91c8d8f6ad23e3c0670e1211c (patch) | |
tree | 31fbd4e79d3e3f387282762ab133f0ae8980572d /src/nvim/testing.c | |
parent | f6299e9d6e13935cc67c2fab16c1a5f6dbc515f3 (diff) | |
download | rneovim-d79e72621226cae91c8d8f6ad23e3c0670e1211c.tar.gz rneovim-d79e72621226cae91c8d8f6ad23e3c0670e1211c.tar.bz2 rneovim-d79e72621226cae91c8d8f6ad23e3c0670e1211c.zip |
vim-patch:8.2.4397: crash when using many composing characters in error message (#23481)
Problem: Crash when using many composing characters in error message.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
https://github.com/vim/vim/commit/34f8117dec685ace52cd9e578e2729db278163fc
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testing.c')
-rw-r--r-- | src/nvim/testing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/testing.c b/src/nvim/testing.c index 4a48743b44..867a8ffd3a 100644 --- a/src/nvim/testing.c +++ b/src/nvim/testing.c @@ -121,7 +121,7 @@ static void ga_concat_shorten_esc(garray_T *gap, const char *str) for (const char *p = str; *p != NUL; p++) { int same_len = 1; const char *s = p; - const int c = mb_ptr2char_adv(&s); + const int c = mb_cptr2char_adv(&s); const int clen = (int)(s - p); while (*s != NUL && c == utf_ptr2char(s)) { same_len++; |