diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-13 11:16:07 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-13 11:16:07 +0000 |
commit | 2369968dc3bf592b350c6d7852aa2fa73537bc81 (patch) | |
tree | 18ebe3e984092b867caac02b8b42c70b8b121ac4 /src/cryptonote_core | |
parent | db_lmdb: implement BlockchainLMDB::reset (diff) | |
download | monero-2369968dc3bf592b350c6d7852aa2fa73537bc81.tar.xz |
blockchain: fix off by one in get_blocks
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 2d71b61a1..41fb71c67 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -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)); } |