aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding')
-rw-r--r--src/encoding/xml/marshal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/xml/marshal.go b/src/encoding/xml/marshal.go
index c93e35222d..5cf12f0888 100644
--- a/src/encoding/xml/marshal.go
+++ b/src/encoding/xml/marshal.go
@@ -797,7 +797,7 @@ func (p *printer) marshalSimple(typ reflect.Type, val reflect.Value) (string, []
// [...]byte
var bytes []byte
if val.CanAddr() {
- bytes = val.Slice(0, val.Len()).Bytes()
+ bytes = val.Bytes()
} else {
bytes = make([]byte, val.Len())
reflect.Copy(reflect.ValueOf(bytes), val)