Explorar o código

spec coverage: fix memory ownership issue

Brad Fitzpatrick %!s(int64=11) %!d(string=hai) anos
pai
achega
1a596c3616
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      z_spec_test.go

+ 1 - 1
z_spec_test.go

@@ -144,7 +144,7 @@ func (sc specCoverage) readXRef(se xml.StartElement) []byte {
 			if b != nil {
 				panic("unexpected CharData")
 			}
-			b = []byte(v)
+			b = []byte(string(v))
 		case xml.EndElement:
 			if v.Name.Local != "xref" {
 				panic("expected </xref>")