From 6f818ec7c39c9b136d2152835e287361a30319ec Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 19 Apr 2004 20:58:30 +0000 Subject: [PATCH] *** empty log message *** --- src/storage.cpp | 4 +++- src/torrent.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/storage.cpp b/src/storage.cpp index 9587a77cf..e25585b25 100755 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -1200,7 +1200,9 @@ namespace libtorrent assert(m_slot_to_piece[i] == unallocated); m_unallocated_slots.push_back(i); } - current_slot += skip_blocks; + + // current slot will increase by one at the end of the for-loop too + current_slot += skip_blocks - 1; } // Update progress meter and check if we've been requested to abort diff --git a/src/torrent.cpp b/src/torrent.cpp index a3cfb5f8e..422a2e7c3 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -649,7 +649,12 @@ namespace libtorrent void torrent::second_tick(stat& accumulator) { - if (m_paused) return; + if (m_paused) + { + // let the stats fade out to 0 + m_stat.second_tick(); + return; + } m_time_scaler--; if (m_time_scaler <= 0)