Merge pull request #153 from thomas-yuan/bug_fix

Fix routing_table bucket_size(int bucket) out_of_range logic error.
This commit is contained in:
Arvid Norberg 2015-09-10 19:53:21 -04:00
commit f847104252
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ public:
{
int num_buckets = m_buckets.size();
if (num_buckets == 0) return 0;
if (bucket < num_buckets) bucket = num_buckets - 1;
if (bucket >= num_buckets) bucket = num_buckets - 1;
table_t::const_iterator i = m_buckets.begin();
std::advance(i, bucket);
return int(i->live_nodes.size());