blockchain: fix off by one in get_blocks

This commit is contained in:
moneromooo-monero 2015-12-13 11:16:07 +00:00
parent 8af913a3d1
commit 2369968dc3
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 1 deletions

View File

@ -1361,7 +1361,7 @@ bool Blockchain::get_blocks(uint64_t start_offset, size_t count, std::list<block
if(start_offset > m_db->height())
return false;
for(size_t i = start_offset; i < start_offset + count && i <= m_db->height();i++)
for(size_t i = start_offset; i < start_offset + count && i < m_db->height();i++)
{
blocks.push_back(m_db->get_block_from_height(i));
}