From 026fcfff62e91e80de2481e2e9bd5c46dc3f47e8 Mon Sep 17 00:00:00 2001 From: EmperorBale Date: Mon, 18 Jul 2022 13:34:07 -0700 Subject: [PATCH] wstr: Ascii character detection in the UTF-8 decoder should use `<`, not `<=` --- wstr/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wstr/src/utils.rs b/wstr/src/utils.rs index d6235e5e1..c57da5c95 100644 --- a/wstr/src/utils.rs +++ b/wstr/src/utils.rs @@ -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;