Changeset 6966


Ignore:
Timestamp:
Oct 27, 2008, 4:39:30 AM (12 years ago)
Author:
charles
Message:

fix r6965 oops

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r6965 r6966  
    15561556    if( index >= tor->info.pieceCount )
    15571557        err = 1;
    1558     else if( ( offset + length ) >= tr_torPieceCountBytes( tor, index ) )
     1558    if( length < 1 )
    15591559        err = 2;
     1560    else if( ( offset + length ) > tr_torPieceCountBytes( tor, index ) )
     1561        err = 3;
    15601562    else if( length > MAX_BLOCK_SIZE )
    1561         err = 3;
     1563        err = 4;
    15621564    else if( tr_pieceOffset( tor, index, offset, length ) > tor->info.totalSize )
    1563         err = 4;
     1565        err = 5;
    15641566
    15651567    if( err ) fprintf( stderr, "index %lu offset %lu length %lu err %d\n",
Note: See TracChangeset for help on using the changeset viewer.