- Timestamp:
- Oct 22, 2009, 2:33:03 AM (13 years ago)
- Location:
- branches/1.7x
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.7x/NEWS
r9359 r9360 5 5 ==== Daemon ==== 6 6 * Fix ratio-limit bug on some uClibc systems 7 * Fix invalid JSON "nan" error on optware 7 8 ==== GTK+ ==== 8 9 * Fix broken SIGINT (ctrl-c) handling -
branches/1.7x/libtransmission/utils.c
r8904 r9360 1329 1329 tr_truncd( double x, int decimal_places ) 1330 1330 { 1331 const int i = (int) pow( 10, decimal_places ); 1332 double x2 = (int)(x*i); 1331 static const int multiplier[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000 }; 1332 const int64_t i = multiplier[decimal_places]; 1333 double x2 = (int64_t)(x*i); 1333 1334 return x2 / i; 1334 1335 }
Note: See TracChangeset
for help on using the changeset viewer.