mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Fixed overflow that caused ratio to become negative
- Added some more asserts so that it doesn't happen again - Fixed waiting for paused_alert on exit in the case where a torrent was paused then resumed before we received torrent_paused_alert
This commit is contained in:
parent
c51abd9096
commit
44d61e0b9d
3 changed files with 24 additions and 8 deletions
|
@ -93,7 +93,7 @@ properties::properties(QWidget *parent, bittorrent *BTSession, torrent_handle &h
|
|||
else
|
||||
ratio = 10.; // Max ratio
|
||||
}else{
|
||||
ratio = (float)torrentStatus.total_payload_upload/(float)torrentStatus.total_payload_download;
|
||||
ratio = (double)torrentStatus.total_payload_upload/(double)torrentStatus.total_payload_download;
|
||||
if(ratio > 10.){
|
||||
ratio = 10.;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue