mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 13:23:29 +01:00
blockchain: fix off by one in get_blocks
This commit is contained in:
parent
8af913a3d1
commit
2369968dc3
@ -1361,7 +1361,7 @@ bool Blockchain::get_blocks(uint64_t start_offset, size_t count, std::list<block
|
|||||||
if(start_offset > m_db->height())
|
if(start_offset > m_db->height())
|
||||||
return false;
|
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));
|
blocks.push_back(m_db->get_block_from_height(i));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user