This commit is contained in:
Kovid Goyal 2025-06-06 13:32:46 +05:30
parent 7029a35df9
commit 5e6d4ea4c0
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -38,7 +38,7 @@ func check_ascii(bytes []byte) (ascii_until int) {
}
// Handle remaining bytes
for ; i < slen; i++ {
if bytes[i] > 127 {
if bytes[i]&utf8.RuneSelf != 0 {
return i
}
}