aboutsummaryrefslogtreecommitdiff
path: root/core/unicode
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-10-09 18:33:24 +0100
committerGitHub <noreply@github.com>2025-10-09 18:33:24 +0100
commitb8fdd91c9fdbd41f0a5a385cf25c67de5f980edc (patch)
treeedfe4f493f4b53de57976566b67113e6a4b4307c /core/unicode
parentb04c3900abd7f77d174bb5511467caaee959e3d1 (diff)
parentee063e708a119012653bf22db5111537d2d53cb6 (diff)
Merge pull request #5776 from connnnal/utf8-1-bounds
Disable bounds check for the first utf8 byte
Diffstat (limited to 'core/unicode')
-rw-r--r--core/unicode/utf8/utf8.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/unicode/utf8/utf8.odin b/core/unicode/utf8/utf8.odin
index 31bdb3491..5740ae71e 100644
--- a/core/unicode/utf8/utf8.odin
+++ b/core/unicode/utf8/utf8.odin
@@ -109,7 +109,7 @@ decode_rune_in_bytes :: proc "contextless" (s: []u8) -> (rune, int) {
if n < 1 {
return RUNE_ERROR, 0
}
- s0 := s[0]
+ #no_bounds_check s0 := s[0]
x := accept_sizes[s0]
if x >= 0xF0 {
mask := rune(x) << 31 >> 31 // NOTE(bill): Create 0x0000 or 0xffff.