From 96430f5edd6ed19e69cece76229019acbe20a062 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 15 Jul 2007 14:24:06 +0000 Subject: [PATCH] added an assert to bandwidth limiter --- include/libtorrent/bandwidth_manager.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/libtorrent/bandwidth_manager.hpp b/include/libtorrent/bandwidth_manager.hpp index a1bc0ffa8..4df9d4f2f 100644 --- a/include/libtorrent/bandwidth_manager.hpp +++ b/include/libtorrent/bandwidth_manager.hpp @@ -398,6 +398,7 @@ private: , amount); assert(hand_out_amount > 0); amount -= hand_out_amount; + assert(hand_out_amount <= qe.max_block_size); t->assign_bandwidth(m_channel, hand_out_amount, qe.max_block_size); qe.peer->assign_bandwidth(m_channel, hand_out_amount); add_history_entry(history_entry(