mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
encoding/xml: fix copy bug
Fixes #2484. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5417059
This commit is contained in:
parent
6e3e380923
commit
fe838c2ddb
2 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue