diff options
author | Filippo Valsorda <filippo@golang.org> | 2018-07-02 17:50:42 -0400 |
---|---|---|
committer | Filippo Valsorda <filippo@golang.org> | 2018-07-02 22:36:31 +0000 |
commit | 0bad1bef406e987b7b749efc3bb7ab5d08b36a1c (patch) | |
tree | 34b9f97d1683622d58605928e4d75fb4df711ae5 /src/strings/strings.go | |
parent | 3959ce667657defe1c99984adde93ca496953765 (diff) | |
parent | 7df09b4a03f9e53334672674ba7983d5e7128646 (diff) | |
download | go-git-dev.boringcrypto.go1.9.tar.gz |
[dev.boringcrypto.go1.9] all: merge go1.9.7 into dev.boringcrypto.go1.9dev.boringcrypto.go1.9
Change-Id: I1f9769a0c2c7c090886afa31c86c403da29d2013
Diffstat (limited to 'src/strings/strings.go')
-rw-r--r-- | src/strings/strings.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strings/strings.go b/src/strings/strings.go index 0c836c09d4..0d660b6217 100644 --- a/src/strings/strings.go +++ b/src/strings/strings.go @@ -523,7 +523,7 @@ func Map(mapping func(rune) rune, s string) string { b = make([]byte, len(s)+utf8.UTFMax) nbytes = copy(b, s[:i]) if r >= 0 { - if r <= utf8.RuneSelf { + if r < utf8.RuneSelf { b[nbytes] = byte(r) nbytes++ } else { @@ -553,7 +553,7 @@ func Map(mapping func(rune) rune, s string) string { r := mapping(c) // common case - if (0 <= r && r <= utf8.RuneSelf) && nbytes < len(b) { + if (0 <= r && r < utf8.RuneSelf) && nbytes < len(b) { b[nbytes] = byte(r) nbytes++ continue |