From 284f2f0fecfb53208126e15bea49e7efe061e10b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 25 Feb 2026 12:59:17 -0800 Subject: [PATCH] Improved casting for HNSW scan memory limit [skip ci] --- src/hnswscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hnswscan.c b/src/hnswscan.c index 8752d62..ad8163c 100644 --- a/src/hnswscan.c +++ b/src/hnswscan.c @@ -151,7 +151,7 @@ hnswbeginscan(Relation index, int nkeys, int norderbys) /* Calculate max memory */ /* Add 256 extra bytes to fill last block when close */ maxMemory = (double) work_mem * hnsw_scan_mem_multiplier * 1024.0 + 256; - so->maxMemory = Min(maxMemory, (double) SIZE_MAX / 2); + so->maxMemory = Min(maxMemory, (double) (SIZE_MAX / 2)); scan->opaque = so;