Fix type aliasing comparison; Fix gb_utf8_decode

This commit is contained in:
gingerBill
2018-06-15 19:59:35 +01:00
parent e9e7ce2606
commit 5081ea1a0c
5 changed files with 28 additions and 14 deletions
+1 -1
View File
@@ -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;