(trunk) #2271: rounding problem in printf()

This commit is contained in:
Charles Kerr
2009-07-14 20:09:46 +00:00
parent cbf9580ec2
commit e5ff7d8f3e
7 changed files with 34 additions and 33 deletions
+3 -3
View File
@@ -235,8 +235,8 @@ getStatusStr( const tr_stat * st,
{
tr_snprintf( buf, buflen,
"Verifying local files (%.2f%%, %.2f%% valid)",
100 * st->recheckProgress,
100.0 * st->percentDone );
tr_truncd( 100 * st->recheckProgress, 2 ),
tr_truncd( 100 * st->percentDone, 2 ) );
}
else if( st->activity & TR_STATUS_DOWNLOAD )
{
@@ -246,7 +246,7 @@ getStatusStr( const tr_stat * st,
buf, buflen,
"Progress: %.1f%%, dl from %d of %d peers (%.0f KB/s), "
"ul to %d (%.0f KB/s) [%s]",
st->percentDone * 100.0,
tr_truncd( 100 * st->percentDone, 1 ),
st->peersSendingToUs,
st->peersConnected,
st->pieceDownloadSpeed,