Off by one error in torrent.pieceLength?
This commit is contained in:
parent
380dc7a2b4
commit
61af11fddc
@ -655,7 +655,7 @@ type Peer struct {
|
||||
}
|
||||
|
||||
func (t *torrent) pieceLength(piece int) (len_ pp.Integer) {
|
||||
if piece < 0 || piece > t.Info.NumPieces() {
|
||||
if piece < 0 || piece >= t.Info.NumPieces() {
|
||||
return
|
||||
}
|
||||
if int(piece) == t.numPieces()-1 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user