Perform download progress computation in floats to avoid integer overflow at
around 40Mb on 32-bit architectures.
This commit is contained in:
Sergey Popov 2011-09-13 12:16:31 +00:00
parent 729b433554
commit ba1d8b9f3c

View file

@ -49,7 +49,7 @@ void tnetwork_transmission::pump_monitor::process(events::pump_info&)
}
if(total) {
find_widget<tprogress_bar>(&(window_.get()), "progress", false)
.set_percentage((completed*100)/total);
.set_percentage((completed*100.)/total);
std::stringstream ss;
ss << utils::si_string(completed, true, _("unit_byte^B"))