mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +00:00
(trunk) fix assertion failure reported by kdrweez in http://transmission.m0k.org/forum/viewtopic.php?t=2096
This commit is contained in:
parent
0588684061
commit
3cb5ba7eed
1 changed files with 2 additions and 2 deletions
|
@ -122,9 +122,9 @@ tr_cpEnsureDoneValid( const tr_completion_t * ccp )
|
|||
|
||||
/* the last piece/block is probably smaller than the others */
|
||||
if( !info->pieces[info->pieceCount-1].dnd ) {
|
||||
total -= ( info->pieceSize - ( info->totalSize % info->pieceSize ) );
|
||||
total -= ( info->pieceSize - tr_torPieceCountBytes(tor,info->pieceCount-1) );
|
||||
if( tr_cpBlockIsComplete( cp, tor->blockCount-1 ) )
|
||||
have -= ( tor->blockSize - ( info->totalSize % tor->blockSize ) );
|
||||
have -= ( tor->blockSize - tr_torBlockCountBytes(tor,tor->blockCount-1) );
|
||||
}
|
||||
|
||||
assert( have <= total );
|
||||
|
|
Loading…
Reference in a new issue