From e01ac4c84687cf9f8040e5a5b2deb7cc052a1a98 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 26 Aug 2007 23:49:57 +0000 Subject: [PATCH] bandwidth limiter asserts --- libtorrent/src/torrent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index a425a8f51..dc42bb340 100755 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -2025,7 +2025,9 @@ namespace libtorrent , boost::intrusive_ptr const& p , bool non_prioritized) { + assert(m_bandwidth_limit[channel].throttle() > 0); int block_size = m_bandwidth_limit[channel].throttle() / 10; + if (block_size <= 0) block_size = 1; if (m_bandwidth_limit[channel].max_assignable() > 0) {