From efc306a8d34eab842b296e4833cf7fafe8e3bb80 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 17 Jul 2011 14:15:02 +0000 Subject: [PATCH] (trunk libT) truncate the fractions when formatting KB/s speeds --- libtransmission/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtransmission/utils.c b/libtransmission/utils.c index 2c8758e46..50e8c5003 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -1730,7 +1730,7 @@ tr_formatter_speed_KBps( char * buf, double KBps, size_t buflen ) double speed = KBps; if( speed <= 999.95 ) /* 0.0 KB to 999.9 KB */ - tr_snprintf( buf, buflen, "%.2f %s", speed, speed_units.units[TR_FMT_KB].name ); + tr_snprintf( buf, buflen, "%d %s", (int)speed, speed_units.units[TR_FMT_KB].name ); else { speed /= K; if( speed <= 99.995 ) /* 0.98 MB to 99.99 MB */