From a91b4e9ec38d03aa3412710cd87fcbf1e4fb6d16 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 21 Aug 2007 06:38:27 +0000 Subject: [PATCH] another attempt to fix to #133 --- src/peer_connection.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 7c8dd17da..71cff4127 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -1563,9 +1563,13 @@ namespace libtorrent assert(t); for (std::vector::iterator i = m_allowed_fast.begin(); - i != m_allowed_fast.end(); ++i) + i != m_allowed_fast.end();) { - if (!t->have_piece(*i)) continue; + if (!t->have_piece(*i)) + { + ++i; + continue; + } *i = m_allowed_fast.back(); m_allowed_fast.pop_back(); }