mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-04 10:54:35 +00:00
Fixed possible division by 0
This commit is contained in:
parent
80f61880b7
commit
0ec6af03c0
@ -84,8 +84,10 @@ void bittorrent::updateETAs(){
|
||||
}else{
|
||||
torrent_status torrentStatus = h.status();
|
||||
torrent_info ti = h.get_torrent_info();
|
||||
listEtas << (long)((ti.total_size()-torrentStatus.total_done)/(double)torrentStatus.download_payload_rate);
|
||||
ETAstats[hash] = listEtas;
|
||||
if(torrentStatus.download_payload_rate != 0){
|
||||
listEtas << (long)((ti.total_size()-torrentStatus.total_done)/(double)torrentStatus.download_payload_rate);
|
||||
ETAstats[hash] = listEtas;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user