From e724b9c4f495348faf128c4345f185555dfaf73f Mon Sep 17 00:00:00 2001 From: laa Date: Wed, 8 Nov 2023 09:24:50 +0100 Subject: [PATCH] Integer overflow has been fixed. --- .../src/main/java/jetbrains/vectoriadb/index/IndexBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vectoriadb-index/src/main/java/jetbrains/vectoriadb/index/IndexBuilder.java b/vectoriadb-index/src/main/java/jetbrains/vectoriadb/index/IndexBuilder.java index 18b2e9fd1..d4b701edb 100644 --- a/vectoriadb-index/src/main/java/jetbrains/vectoriadb/index/IndexBuilder.java +++ b/vectoriadb-index/src/main/java/jetbrains/vectoriadb/index/IndexBuilder.java @@ -422,7 +422,7 @@ private static void mergeAndStorePartitionsOnDisk(MMapedGraph[] partitions, int assert edgesSize <= maxConnectionsPerVertex; edgesOffset += Integer.BYTES; - diskCache.set(ValueLayout.JAVA_INT, resultEdgesCountOffset, (byte) edgesSize); + diskCache.set(ValueLayout.JAVA_INT, resultEdgesCountOffset, (int) edgesSize); MemorySegment.copy(partition.edges, edgesOffset,