fix(mkspell): prevent Unicode character overflow (#23760)

introduced in: bd22585061
fixes #23758
This commit is contained in:
julio-b 2023-05-26 04:13:00 +00:00 committed by GitHub
parent a6dd67f5b6
commit d31f7648ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {