From 93a21b8819ddb5c73842c74ab50403261a8490dc Mon Sep 17 00:00:00 2001 From: Joel Knighton Date: Fri, 29 Sep 2023 16:29:52 -0500 Subject: [PATCH] Fix SimpleMappedReader to respect offset in read(int[], int, int) --- .../java/io/github/jbellis/jvector/disk/SimpleMappedReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jvector-base/src/main/java/io/github/jbellis/jvector/disk/SimpleMappedReader.java b/jvector-base/src/main/java/io/github/jbellis/jvector/disk/SimpleMappedReader.java index 343da0370..c03e2a486 100644 --- a/jvector-base/src/main/java/io/github/jbellis/jvector/disk/SimpleMappedReader.java +++ b/jvector-base/src/main/java/io/github/jbellis/jvector/disk/SimpleMappedReader.java @@ -91,7 +91,7 @@ public int readInt() { @Override public void read(int[] ints, int offset, int count) { for (int i = 0; i < count; i++) { - ints[i] = mbb.getInt(); + ints[offset + i] = mbb.getInt(); } }