forked from premiere/premiere-libtorrent
fixed decrement of start-of-sequence iterator in invariant_check code. Fixes debug-iterator assert
This commit is contained in:
parent
658eef82a5
commit
88a7e445ad
|
@ -339,7 +339,7 @@ namespace libtorrent
|
||||||
if (num_pieces > 0)
|
if (num_pieces > 0)
|
||||||
{
|
{
|
||||||
for (std::vector<piece_pos>::const_iterator i = m_piece_map.begin()
|
for (std::vector<piece_pos>::const_iterator i = m_piece_map.begin()
|
||||||
+ (index - 1); index > 0 && (i->have() || i->filtered()); --i, --index);
|
+ (index - 1); index > 0 && (i->have() || i->filtered()); i != m_piece_map.begin() ? --i : i, --index);
|
||||||
TORRENT_ASSERT(index == num_pieces
|
TORRENT_ASSERT(index == num_pieces
|
||||||
|| m_piece_map[index].have()
|
|| m_piece_map[index].have()
|
||||||
|| m_piece_map[index].filtered());
|
|| m_piece_map[index].filtered());
|
||||||
|
|
Loading…
Reference in New Issue