Selaa lähdekoodia

Note that Decode's dst and src must not overlap.

Nigel Tao 9 vuotta sitten
vanhempi
commit
da163d3224
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      decode.go

+ 1 - 1
decode.go

@@ -47,7 +47,7 @@ func decodedLen(src []byte) (blockLen, headerLen int, err error) {
 // slice of dst if dst was large enough to hold the entire decoded block.
 // Otherwise, a newly allocated slice will be returned.
 //
-// It is valid to pass a nil dst.
+// The dst and src must not overlap. It is valid to pass a nil dst.
 func Decode(dst, src []byte) ([]byte, error) {
 	dLen, s, err := decodedLen(src)
 	if err != nil {