core: Multibyte codepoints cannot be in ascii range
This commit is contained in:
parent
d6604f538c
commit
ba2416c126
|
@ -147,7 +147,10 @@ impl<'a> Iterator for AvmUtf8Decoder<'a> {
|
|||
ch <<= 6;
|
||||
ch |= (*b & (u8::MAX >> 2)) as u32;
|
||||
}
|
||||
if !fail {
|
||||
if ch <= 128 {
|
||||
self.index += 1;
|
||||
ch = first as u32;
|
||||
} else if !fail {
|
||||
self.index += mb_count as usize + 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue