Fix type aliasing comparison; Fix gb_utf8_decode
This commit is contained in:
1 parent
e9e7ce2606
commit
5081ea1a0c
5 files changed
+28
-14
No files matched your search
+1
-1
@@ -6894,7 +6894,7 @@ isize gb_utf8_decode(u8 const *str, isize str_len, Rune *codepoint_out) {
|
||||
u8 x = gb__utf8_first[s0], sz;
|
||||
u8 b1, b2, b3;
|
||||
gbUtf8AcceptRange accept;
|
||||
if (x > 0xf0) {
|
||||
if (x >= 0xf0) {
|
||||
Rune mask = (cast(Rune)x >> 31) << 31;
|
||||
codepoint = (cast(Rune)s0 & (~mask)) | (GB_RUNE_INVALID & mask);
|
||||
width = 1;
|
||||
|
||||
Reference in new issue
Block a user