From 2369968dc3bf592b350c6d7852aa2fa73537bc81 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 13 Dec 2015 11:16:07 +0000 Subject: blockchain: fix off by one in get_blocks --- src/cryptonote_core/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptonote_core') 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 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)); } -- cgit v1.2.3