1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

(cli) #1223 ratio display in CLI client malformed

This commit is contained in:
Charles Kerr 2008-08-22 22:54:59 +00:00
parent d39005b0d1
commit 64dad38800

View file

@ -73,11 +73,11 @@ tr_strlratio( char * buf, double ratio, size_t buflen )
else if( (int)ratio == TR_RATIO_INF )
tr_strlcpy( buf, "Inf", buflen );
else if( ratio < 10.0 )
tr_snprintf( buf, buflen, "%'.2f", ratio );
tr_snprintf( buf, buflen, "%.2f", ratio );
else if( ratio < 100.0 )
tr_snprintf( buf, buflen, "%'.1f", ratio );
tr_snprintf( buf, buflen, "%.1f", ratio );
else
tr_snprintf( buf, buflen, "%'.0f", ratio );
tr_snprintf( buf, buflen, "%.0f", ratio );
return buf;
}