Also, avoid string(i) where i has type int.
Updates #32479
Change-Id: If3c6edc8523860082726e034ef9e887b5f7fabd1
Reviewed-on: https://go-review.googlesource.com/c/go/+/221382
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
func tostr(v Val) Val {
switch u := v.U.(type) {
case *Mpint:
- var i int64 = 0xFFFD
- if u.Cmp(minintval[TUINT32]) >= 0 && u.Cmp(maxintval[TUINT32]) <= 0 {
- i = u.Int64()
+ var r rune = 0xFFFD
+ if u.Cmp(minintval[TINT32]) >= 0 && u.Cmp(maxintval[TINT32]) <= 0 {
+ r = rune(u.Int64())
}
- v.U = string(i)
+ v.U = string(r)
}
return v