1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

(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

View file

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