1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 13:16:53 +00:00

fix bug from r9820 where file progress was either 0.0 or 1.0

This commit is contained in:
Mitchell Livingston 2009-12-29 01:35:52 +00:00
parent 8ae3911477
commit 90ecb67c92

View file

@ -1125,7 +1125,7 @@ tr_torrentFiles( const tr_torrent * tor,
for( i=0; i<n; ++i, ++walk ) {
const uint64_t b = isSeed ? tor->info.files[i].length : fileBytesCompleted( tor, i );
walk->bytesCompleted = b;
walk->progress = tor->info.files[i].length > 0.0 ? ( b / tor->info.files[i].length ) : 1.0;
walk->progress = tor->info.files[i].length > 0.0 ? ( (float)b / tor->info.files[i].length ) : 1.0;
}
if( fileCount )