fix off-by-one in r2488 reported by BentMyWookie. Hooray for assert()!
This commit is contained in:
parent
730d6df742
commit
95313e077a
|
@ -173,7 +173,7 @@ tr_torrentInitFilePieces( tr_torrent_t * tor )
|
|||
uint64_t lastByte;
|
||||
int lastBlock;
|
||||
if( i == (tor->info.pieceCount-1))
|
||||
lastByte = tor->info.totalSize;
|
||||
lastByte = tor->info.totalSize - 1;
|
||||
else {
|
||||
lastByte = i + 1;
|
||||
lastByte *= tor->info.pieceSize;
|
||||
|
|
Loading…
Reference in New Issue