aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zen/cmds/builds_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp
index ececab29e..ed1eb2d19 100644
--- a/src/zen/cmds/builds_cmd.cpp
+++ b/src/zen/cmds/builds_cmd.cpp
@@ -855,7 +855,7 @@ namespace {
ZEN_ASSERT((Offset + Size) <= SourceSize);
const uint64_t BlockIndexStart = Offset / BlockSize;
- const uint64_t BlockIndexEnd = (Offset + Size) / BlockSize;
+ const uint64_t BlockIndexEnd = (Offset + Size - 1) / BlockSize;
std::vector<SharedBuffer> BufferRanges;
BufferRanges.reserve(BlockIndexEnd - BlockIndexStart + 1);