Changeset 5357


Ignore:
Timestamp:
Mar 24, 2008, 4:10:04 PM (14 years ago)
Author:
charles
Message:

#811: fix r5329 error in trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r5332 r5357  
    12321232       every file using that piece is DND */
    12331233    firstPieceDND = dnd;
    1234     for( i=fileIndex-1; firstPieceDND; --i ) {
    1235         if( tor->info.files[i].lastPiece != firstPiece )
    1236             break;
    1237         firstPieceDND = tor->info.files[i].dnd;
    1238         if( !i )
    1239             break;
     1234    if( fileIndex > 0 ) {
     1235        for( i=fileIndex-1; firstPieceDND; --i ) {
     1236            if( tor->info.files[i].lastPiece != firstPiece )
     1237                break;
     1238            firstPieceDND = tor->info.files[i].dnd;
     1239            if( !i )
     1240                break;
     1241        }
    12401242    }
    12411243
Note: See TracChangeset for help on using the changeset viewer.