dht array index out of bound fix

This commit is contained in:
Arvid Norberg 2008-04-16 03:20:35 +00:00
parent 73d9db3877
commit 1724b1eb75
1 changed files with 2 additions and 2 deletions

View File

@ -229,8 +229,8 @@ void routing_table::node_failed(node_id const& id)
{ {
b.erase(i); b.erase(i);
TORRENT_ASSERT(m_lowest_active_bucket <= bucket_index); TORRENT_ASSERT(m_lowest_active_bucket <= bucket_index);
while (m_buckets[m_lowest_active_bucket].first.empty() while (m_lowest_active_bucket < 160
&& m_lowest_active_bucket < 160) && m_buckets[m_lowest_active_bucket].first.empty())
{ {
++m_lowest_active_bucket; ++m_lowest_active_bucket;
} }