From 705e71015fa305399c42a74473f2487bfe4795a6 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 27 Jan 2024 19:49:40 -0800 Subject: [PATCH] Fixed uninitialized entry point level - fixes #439 and closes #440 --- src/hnswutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hnswutils.c b/src/hnswutils.c index f7c0029..8ae7001 100644 --- a/src/hnswutils.c +++ b/src/hnswutils.c @@ -315,7 +315,10 @@ HnswGetMetaPageInfo(Relation index, int *m, HnswElement * entryPoint) if (entryPoint != NULL) { if (BlockNumberIsValid(metap->entryBlkno)) + { *entryPoint = HnswInitElementFromBlock(metap->entryBlkno, metap->entryOffno); + (*entryPoint)->level = metap->entryLevel; + } else *entryPoint = NULL; }