diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go index 926f65cc8f854e23794779758ecd45a894747236..529d95a8884552e4ed1851f83e213d288f49f606 100644 --- a/src/bytes/bytes.go +++ b/src/bytes/bytes.go @@ -699,7 +699,7 @@ func ToValidUTF8(s, replacement []byte) []byte { if c < utf8.RuneSelf { i++ invalid = false - b = append(b, byte(c)) + b = append(b, c) continue } _, wid := utf8.DecodeRune(s[i:])