]> Cypherpunks.ru repositories - gostls13.git/commit
unicode: correctly handle negative runes
authorDavid Benjamin <davidben@google.com>
Fri, 25 Dec 2020 17:02:55 +0000 (12:02 -0500)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Wed, 24 Feb 2021 04:00:46 +0000 (04:00 +0000)
commit37805292550e7144200b09320ffb61f21d421f8d
tree6fa5fe849583a3bab0eaae772d74a84a4e79e888
parent0694fb3d78f9ce2add154203dbd42a7a5a07c2da
unicode: correctly handle negative runes

Is and isExcludingLatin did not handle negative runes when dispatching
to is16. TestNegativeRune covers this along with the existing uint32
casts in IsGraphic, etc. (For tests, I picked the smallest non-Latin-1
code point in each range.)

Updates #43254

Change-Id: I17261b91f0d2b5b5125d19219411b45c480df74f
Reviewed-on: https://go-review.googlesource.com/c/go/+/280493
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
src/unicode/letter.go
src/unicode/letter_test.go