torrent.go | 2 +- diff --git a/torrent.go b/torrent.go index 3bbbcef8623bb73417fdc83b0dde7ad650403a8f..00d5ac07aeb3d98e378a92a07b86d486a2447db4 100644 --- a/torrent.go +++ b/torrent.go @@ -655,7 +655,7 @@ SupportsEncryption bool } 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 {