From 0e9949b0dfad0d98f370dc8fcdef421940556cea Mon Sep 17 00:00:00 2001 From: Saptarshi Sen Date: Mon, 22 Apr 2024 20:10:03 -0700 Subject: [PATCH] MB-61609: Fix zero sa_code_size Signed-off-by: Saptarshi Sen --- c_api/Index_c.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_api/Index_c.cpp b/c_api/Index_c.cpp index ed66405676..f50282d263 100644 --- a/c_api/Index_c.cpp +++ b/c_api/Index_c.cpp @@ -196,7 +196,7 @@ int faiss_Index_compute_residual_n( int faiss_Index_sa_code_size(const FaissIndex* index, size_t* size) { try { - reinterpret_cast(index)->sa_code_size(); + *size = reinterpret_cast(index)->sa_code_size(); } CATCH_AND_HANDLE }