diff --git a/src/org/kiwix/kiwixmobile/downloader/ChunkUtils.java b/src/org/kiwix/kiwixmobile/downloader/ChunkUtils.java index 0ad8ef561..c5c102598 100644 --- a/src/org/kiwix/kiwixmobile/downloader/ChunkUtils.java +++ b/src/org/kiwix/kiwixmobile/downloader/ChunkUtils.java @@ -25,12 +25,12 @@ public class ChunkUtils { String range; if (currentRange + CHUNK_SIZE >= contentLength) { range = String.format("%d-", currentRange); - currentRange += CHUNK_SIZE + 1; chunks.add(new Chunk(range, zim, url, contentLength, notificationID, currentRange, contentLength)); + currentRange += CHUNK_SIZE + 1; } else { range = String.format("%d-%d", currentRange, currentRange + CHUNK_SIZE); - currentRange += CHUNK_SIZE + 1; chunks.add(new Chunk(range, zim, url, contentLength, notificationID, currentRange, currentRange + CHUNK_SIZE)); + currentRange += CHUNK_SIZE + 1; } } return chunks;