Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

another small correction

orbiterab1ed053f5d4
diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.java
index 41f456f62..bfadbe0d3 100644
--- a/source/de/anomic/kelondro/kelondroRecords.java
+++ b/source/de/anomic/kelondro/kelondroRecords.java
@@ -1062,7 +1062,7 @@ public class kelondroRecords {
while ((markedDeleted.contains(pos)) && (pos.index < USAGE.allCount())) pos.index++;
// initialize bulk
- bulksize = 65536 / recordsize;
+ bulksize = Math.min(65536 / recordsize, USAGE.allCount());
bulkstart = -bulksize;
bulk = new byte[bulksize * recordsize];
}