Do not check symbol returned (or not and so there is some garbadge) by mb_wc() if mb_wc() failed

This commit is contained in:
Nayuta Yanagisawa 2022-08-10 10:40:37 +02:00 committed by Oleksandr Byelkin
parent 122742897b
commit faddcf3c39

View File

@ -70,7 +70,7 @@ ulonglong find_set(TYPELIB *lib, const char *str, size_t length, CHARSET_INFO *c
if ((mblen= cs->cset->mb_wc(cs, &wc, (const uchar *) pos,
(const uchar *) end)) < 1)
mblen= 1; // Not to hang on a wrong multibyte sequence
if (wc == (my_wc_t) field_separator)
else if (wc == (my_wc_t) field_separator)
break;
}
}