(trunk) fix assertion bug in torrent.c::fileByteCompleted()

This commit is contained in:
Charles Kerr 2007-08-07 14:17:37 +00:00
parent ffa077454e
commit 82311abfbe
1 changed files with 2 additions and 2 deletions

View File

@ -735,8 +735,8 @@ fileBytesCompleted ( const tr_torrent_t * tor, int fileIndex )
assert( tor != NULL );
assert( 0<=fileIndex && fileIndex<tor->info.fileCount );
assert( file->offset + file->length <= tor->info.totalSize );
assert( (int)firstBlock < tor->blockCount );
assert( (int)lastBlock < tor->blockCount );
assert( ( (int)firstBlock < tor->blockCount ) || (!file->length && file->offset==tor->info.totalSize) );
assert( ( (int)lastBlock < tor->blockCount ) || (!file->length && file->offset==tor->info.totalSize) );
assert( firstBlock <= lastBlock );
assert( (int)tr_torBlockPiece( tor, firstBlock ) == file->firstPiece );
assert( (int)tr_torBlockPiece( tor, lastBlock ) == file->lastPiece );