From ad5a155b1f4b387d3aaa54c91d0146cb0287bb9f Mon Sep 17 00:00:00 2001 From: VanaIgr Date: Mon, 26 Feb 2024 04:12:55 -0600 Subject: fix(mbyte): fix bugs in utf_cp_*_off() functions Problems: - Illegal bytes after valid UTF-8 char cause utf_cp_*_off() to fail. - When stream isn't NUL-terminated, utf_cp_*_off() may go over the end. Solution: Don't go over end of the char of end of the string. --- runtime/doc/dev_vimpatch.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_vimpatch.txt b/runtime/doc/dev_vimpatch.txt index 4ed585589c..e72aa05c90 100644 --- a/runtime/doc/dev_vimpatch.txt +++ b/runtime/doc/dev_vimpatch.txt @@ -203,7 +203,8 @@ information. mb_off2cells utf_off2cells mb_ptr2char utf_ptr2char mb_head_off utf_head_off - mb_tail_off utf_cp_tail_off + mb_tail_off utf_cp_bounds + mb_off_next utf_cp_bounds mb_lefthalve grid_lefthalve mb_fix_col grid_fix_col utf_off2cells grid_off2cells -- cgit