fixed the cause of an inconsistency in the piece picker and the torrent
This commit is contained in:
@@ -965,7 +965,12 @@ namespace libtorrent
|
||||
assert(index < (int)m_piece_map.size());
|
||||
assert(index >= 0);
|
||||
|
||||
if (m_piece_map[index].downloading == 0) return false;
|
||||
if (m_piece_map[index].downloading == 0)
|
||||
{
|
||||
assert(std::find_if(m_downloads.begin(), m_downloads.end(), has_index(index))
|
||||
== m_downloads.end());
|
||||
return false;
|
||||
}
|
||||
std::vector<downloading_piece>::const_iterator i
|
||||
= std::find_if(m_downloads.begin(), m_downloads.end(), has_index(index));
|
||||
assert(i != m_downloads.end());
|
||||
|
Reference in New Issue
Block a user