encoding/xml: fix copy bug

Fixes #2484.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5417059
This commit is contained in:
Russ Cox 2011-11-22 12:31:33 -05:00
parent 6e3e380923
commit fe838c2ddb
2 changed files with 5 additions and 2 deletions

View file

@ -61,7 +61,7 @@ type StartElement struct {
func (e StartElement) Copy() StartElement {
attrs := make([]Attr, len(e.Attr))
copy(e.Attr, attrs)
copy(attrs, e.Attr)
e.Attr = attrs
return e
}