correct logic for detectig 4-byte UTF-8 characters

This commit is contained in:
Axel Kohlmeyer
2021-03-05 17:57:09 -05:00
parent 9a8ac23663
commit 0e6736b614

View File

@ -691,7 +691,7 @@ std::string utils::utf8_subst(const std::string &line)
out += ' ', i += 2;
}
// UTF-8 4-byte character
} else if ((in[i] & 0xe8U) == 0xf0U) {
} else if ((in[i] & 0xf8U) == 0xf0U) {
if ((i+3) < len) {
;
}