Changeset 2533


Ignore:
Timestamp:
Jul 28, 2007, 4:31:08 PM (15 years ago)
Author:
charles
Message:

fix r2531 bug reported by Lacrocivious

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r2532 r2533  
    220220    tor->lastPieceSize = info->totalSize % info->pieceSize;
    221221
     222    if( !tor->lastPieceSize )
     223         tor->lastPieceSize = info->pieceSize;
     224
    222225    tor->lastBlockSize = info->totalSize % tor->blockSize;
     226
     227    if( !tor->lastBlockSize )
     228         tor->lastBlockSize = tor->blockSize;
    223229
    224230    tor->blockCount =
     
    232238
    233239    /* check our work */
    234 fprintf( stderr, "adding torrent [%s]\n", tor->info.name );
    235240    assert( ( info->pieceSize % tor->blockSize ) == 0 );
    236241    t = info->pieceCount - 1;
Note: See TracChangeset for help on using the changeset viewer.