Ignore:
Timestamp:
Aug 8, 2007, 5:17:51 AM (14 years ago)
Author:
charles
Message:

(trunk) fix assertion failure reported by kdrweez in http://transmission.m0k.org/forum/viewtopic.php?t=2096

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r2555 r2657  
    123123    /* the last piece/block is probably smaller than the others */
    124124    if( !info->pieces[info->pieceCount-1].dnd ) {
    125         total -= ( info->pieceSize - ( info->totalSize % info->pieceSize ) );
     125        total -= ( info->pieceSize - tr_torPieceCountBytes(tor,info->pieceCount-1) );
    126126        if( tr_cpBlockIsComplete( cp, tor->blockCount-1 ) )
    127             have -= ( tor->blockSize - ( info->totalSize % tor->blockSize ) );
     127            have -= ( tor->blockSize - tr_torBlockCountBytes(tor,tor->blockCount-1) );
    128128    }
    129129
Note: See TracChangeset for help on using the changeset viewer.