BuildFromMemory从内存中直接生成.torrent

This commit is contained in:
whr819987540 2023-05-04 17:22:46 +08:00
parent ee2821f72e
commit c4fcfe712c
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ func (info *Info) GeneratePiecesFromMemory(byteData []byte) (err error) {
if info.PieceLength == 0 {
return errors.New("piece length must be non-zero")
}
info.Pieces, err = GeneratePiecesFromMemory(byteData, info.PieceLength,int(info.TotalLength()),nil)
info.Pieces, err = GeneratePiecesFromMemory(byteData, info.PieceLength, int(info.TotalLength()), nil)
return
}