fix overflow bug in progress_ppm field

This commit is contained in:
Arvid Norberg 2012-01-09 14:13:24 +00:00
parent 23c477142e
commit dd2db79896
2 changed files with 2 additions and 1 deletions

View File

@ -101,6 +101,7 @@
incoming connection
* added more detailed instrumentation of the disk I/O thread
* fix overflow bug in progress_ppm field
* don't filter local peers received from a non-local tracker
* fix python deadlock when using python extensions
* fixed small memory leak in DHT

View File

@ -3824,7 +3824,7 @@ namespace libtorrent
#else
p.progress = (float)p.pieces.count() / (float)p.pieces.size();
#endif
p.progress_ppm = p.pieces.count() * 1000000 / p.pieces.size();
p.progress_ppm = boost::uint64_t(p.pieces.count()) * 1000000 / p.pieces.size();
}
p.estimated_reciprocation_rate = m_est_reciprocation_rate;