- 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:
Christophe Dumez 2007-08-09 05:03:06 +00:00
parent c51abd9096
commit 44d61e0b9d
3 changed files with 24 additions and 8 deletions

View file

@ -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.;
}