aboutsummaryrefslogtreecommitdiff
path: root/src/strings/strings.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings/strings.go')
-rw-r--r--src/strings/strings.go4
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