commit d31f7648ecaf32426239020331d1bbe9a6f56140
parent a6dd67f5b66c0ef646808422ceeac710ce144547
Author: julio-b <julio.bacel@gmail.com>
Date: Fri, 26 May 2023 04:13:00 +0000
fix(mkspell): prevent Unicode character overflow (#23760)
introduced in: bd22585061b6
fixes #23758
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
@@ -3131,7 +3131,7 @@ static int spell_read_dic(spellinfo_T *spin, char *fname, afffile_T *affile)
// Remove CR, LF and white space from the end. White space halfway through
// the word is kept to allow multi-word terms like "et al.".
l = (int)strlen(line);
- while (l > 0 && line[l - 1] <= ' ') {
+ while (l > 0 && (uint8_t)line[l - 1] <= ' ') {
l--;
}
if (l == 0) {