From 7f2f705b493b52c3be50e176ba568979710edb21 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 5 May 2012 19:46:02 +0000 Subject: [PATCH] fixed piece sorting bug of deadline pieces --- ChangeLog | 1 + src/torrent.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6965e391d..6bc87b7f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ + * fixed piece sorting bug of deadline pieces * fixed python binding build on Mac OS and BSD * fixed UNC path normalization (on windows, unless UNC paths are disabled) * fixed possible crash when enabling multiple connections per IP diff --git a/src/torrent.cpp b/src/torrent.cpp index b9d4ace10..ac799cff5 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3654,7 +3654,7 @@ namespace libtorrent } while (i != m_time_critical_pieces.begin() && i->deadline < boost::prior(i)->deadline) { - std::iter_swap(i, boost::next(i)); + std::iter_swap(i, boost::prior(i)); --i; } return;