diff --git a/c_api/Index_c.cpp b/c_api/Index_c.cpp index 5df3c08ea..1c11239d5 100644 --- a/c_api/Index_c.cpp +++ b/c_api/Index_c.cpp @@ -195,7 +195,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 }