From 4685602794a753e5af356e5d316500a7d9fc0efe Mon Sep 17 00:00:00 2001 From: Daniel Pagan Date: Wed, 14 Aug 2024 12:51:20 -0700 Subject: [PATCH] resize dist_scratch to allow for indexing into the vector for future writing --- src/index.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.cpp b/src/index.cpp index bf93344fa..d44a79e4d 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -962,6 +962,7 @@ std::pair Index::iterate_to_fixed_point( } } + dist_scratch.resize(id_scratch.size()); assert(dist_scratch.capacity() >= id_scratch.size()); compute_dists(id_scratch, dist_scratch); cmps += (uint32_t)id_scratch.size();