mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06: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:
@@ -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.;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user