(trunk gtk) #3429 "GTK properties > information page shows 0%" -- fixed

This commit is contained in:
Charles Kerr 2010-07-15 23:54:22 +00:00
parent 066d261f8c
commit 69a9df0270
1 changed files with 1 additions and 1 deletions

View File

@ -799,7 +799,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n )
str = none;
else {
char buf2[32], unver[64], total[64];
const double ratio = 100.0 * ( leftUntilDone ? ( haveValid + haveUnchecked ) / sizeWhenDone : 1 );
const double ratio = 100.0 * ( leftUntilDone ? ( haveValid + haveUnchecked ) / (double)sizeWhenDone : 1 );
tr_strlpercent( buf2, ratio, sizeof( buf2 ) );
tr_strlsize( total, haveUnchecked + haveValid, sizeof( total ) );
tr_strlsize( unver, haveUnchecked, sizeof( unver ) );