wstr: Ascii character detection in the UTF-8 decoder should use `<`, not `<=`

This commit is contained in:
EmperorBale 2022-07-18 13:34:07 -07:00 committed by Mike Welsh
parent ae5e2be8a3
commit 026fcfff62
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ impl<'a> Iterator for DecodeAvmUtf8<'a> {
ch <<= 6;
ch |= (*b & (u8::MAX >> 2)) as u32;
}
if ch <= 128 {
if ch < 0x80 {
Some(first as u32)
} else {
self.index += mb_count as usize;