diff --git a/TODO b/TODO index ed2aa5bbd..2b029a2a5 100644 --- a/TODO +++ b/TODO @@ -82,4 +82,6 @@ LANGUAGES UPDATED: - Bulgarian *BETA6* beta7->rc1 changelog: +- BUGFIX: Fixed overflow in ratio +- BUGFIX: Added -DNDEBUG flag to fix compilation with libtorrent svn - COSMETIC: Progress bar text now uses style foreground color diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index b5473ea2f..981249fd7 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -749,7 +749,11 @@ void bittorrent::loadDownloadUploadForTorrent(QString hash) { QPair downUp; downUp.first = (size_type)data_list.at(0).toLongLong(); downUp.second = (size_type)data_list.at(1).toLongLong(); - Q_ASSERT(downUp.first >= 0 && downUp.second >= 0); + if(downUp.first < 0 || downUp.second < 0) { + qDebug("** Overflow in ratio!!! fixing..."); + downUp.first = 0; + downUp.second = 0; + } ratioData[hash] = downUp; }