mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
copy(...)
This commit is contained in:
@@ -6625,6 +6625,8 @@ gb_global gbUtf8AcceptRange const gb__utf8_accept_ranges[] = {
|
||||
|
||||
|
||||
isize gb_utf8_decode(u8 const *str, isize str_len, Rune *codepoint_out) {
|
||||
|
||||
|
||||
isize width = 0;
|
||||
Rune codepoint = GB_RUNE_INVALID;
|
||||
|
||||
@@ -6639,6 +6641,11 @@ isize gb_utf8_decode(u8 const *str, isize str_len, Rune *codepoint_out) {
|
||||
width = 1;
|
||||
goto end;
|
||||
}
|
||||
if (s0 < 0x80) {
|
||||
codepoint = s0;
|
||||
width = 1;
|
||||
goto end;
|
||||
}
|
||||
|
||||
sz = x&7;
|
||||
accept = gb__utf8_accept_ranges[x>>4];
|
||||
|
||||
Reference in New Issue
Block a user