mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fixed possible division by 0
This commit is contained in:
parent
80f61880b7
commit
0ec6af03c0
1 changed files with 4 additions and 2 deletions
|
@ -84,11 +84,13 @@ void bittorrent::updateETAs(){
|
|||
}else{
|
||||
torrent_status torrentStatus = h.status();
|
||||
torrent_info ti = h.get_torrent_info();
|
||||
if(torrentStatus.download_payload_rate != 0){
|
||||
listEtas << (long)((ti.total_size()-torrentStatus.total_done)/(double)torrentStatus.download_payload_rate);
|
||||
ETAstats[hash] = listEtas;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long bittorrent::getETA(QString hash) const{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue