Update gb.h

This commit is contained in:
gingerBill 2018-06-15 20:26:31 +01:00 committed by GitHub
parent cf6132dbf3
commit 9381302d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
gb.h
View File

@ -6894,7 +6894,7 @@ isize gb_utf8_decode(u8 const *str, isize str_len, Rune *codepoint_out) {
u8 b1, b2, b3; u8 b1, b2, b3;
gbUtf8AcceptRange accept; gbUtf8AcceptRange accept;
if (x >= 0xf0) { 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); codepoint = (cast(Rune)s0 & (~mask)) | (GB_RUNE_INVALID & mask);
width = 1; width = 1;
goto end; goto end;