more fastresume fixin'

This commit is contained in:
Charles Kerr 2007-07-10 03:49:10 +00:00
parent e45df69b9a
commit 043ba9e1bf
1 changed files with 8 additions and 2 deletions

View File

@ -258,8 +258,14 @@ fastResumeLoadPriorities( tr_torrent_t * tor,
}
/* set the dnd flags */
for( i=0; i<n; ++i )
tor->info.files[i].dnd = *walk++ == 't';
for( i=0; i<n; ++i ) {
int j;
const char ch = *walk++;
tr_file_t * file = &tor->info.files[i];
file->dnd = ch == 't';
for( j=file->firstPiece; j<=file->lastPiece; ++j )
tor->info.pieces[j].dnd = file->dnd;
}
free( buf );
return TR_OK;