summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Taaki <genjix@riseup.net>2014-04-06 15:42:32 (GMT)
committer Amir Taaki <genjix@riseup.net>2014-04-06 15:42:32 (GMT)
commit1f8cdf58c3a42ccccfa33516d528b000aee0a53e (patch)
tree9bf90e94044384d46a6ddc248b760912e57c2b07
parentce596962afd7ec3025021b8ef9c147e9fd00ea40 (diff)
bugfix: alloc error because of overflow.
-rw-r--r--src/block.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/block.cpp b/src/block.cpp
index ed4d582..40a705d 100644
--- a/src/block.cpp
+++ b/src/block.cpp
@@ -69,7 +69,7 @@ index_list block_locator_indexes(int top_height)
index_list indexes;
// Push last 10 indexes first
size_t step = 1, start = 0;
- for (size_t i = top_height; i > 0; i -= step, ++start)
+ for (int i = top_height; i > 0; i -= step, ++start)
{
if (start >= 10)
step *= 2;