aboutsummaryrefslogtreecommitdiff
path: root/src/go/constant/value.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/constant/value.go')
-rw-r--r--src/go/constant/value.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/go/constant/value.go b/src/go/constant/value.go
index 630581047a..310814df71 100644
--- a/src/go/constant/value.go
+++ b/src/go/constant/value.go
@@ -96,7 +96,7 @@ func (x stringVal) String() string {
// only the first maxLen-3 runes; then add "...".
i := 0
for n := 0; n < maxLen-3; n++ {
- _, size := utf8.DecodeRuneInString(s)
+ _, size := utf8.DecodeRuneInString(s[i:])
i += size
}
s = s[:i] + "..."