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 }