diff --git a/src/ivfflat.h b/src/ivfflat.h index 5620ef9..9d58b39 100644 --- a/src/ivfflat.h +++ b/src/ivfflat.h @@ -315,7 +315,7 @@ typedef struct IvfflatScanOpaqueData typedef IvfflatScanOpaqueData * IvfflatScanOpaque; -#define VECTOR_ARRAY_SIZE(_length, _size) (sizeof(VectorArrayData) + (_length) * MAXALIGN(_size)) +#define VECTOR_ARRAY_SIZE(_length, _size) add_size(sizeof(VectorArrayData), mul_size(_length, MAXALIGN(_size))) /* Use functions instead of macros to avoid double evaluation */