aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar gingerBill 2018-06-15 20:26:31 +0100
committerGravatar GitHub 2018-06-15 20:26:31 +0100
commit9381302d81d5a4978e4c0071df401f8e18ff3104 (patch)
tree7ac4ed24689db220f0dbd17106d1e45a522fc936
parentFix gb_utf8_decode (diff)
Update gb.h
-rw-r--r--gb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gb.h b/gb.h
index c27692d..fd092d3 100644
--- a/gb.h
+++ b/gb.h
@@ -6894,7 +6894,7 @@ isize gb_utf8_decode(u8 const *str, isize str_len, Rune *codepoint_out) {
u8 b1, b2, b3;
gbUtf8AcceptRange accept;
if (x >= 0xf0) {
- Rune mask = (cast(Rune)x >> 31) << 31;
+ Rune mask = (cast(Rune)x << 31) >> 31;
codepoint = (cast(Rune)s0 & (~mask)) | (GB_RUNE_INVALID & mask);
width = 1;
goto end;