branch: externals/heap
commit 55d47fd2945c296ac7e311413017d3e7eaccdc3b
Author: Toby Cubitt <[email protected]>
Commit: tsc25 <[email protected]>
Fixed ancient but overlooked bug in heap resizing in heap-add.
---
heap.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/heap.el b/heap.el
index 027e45f..4474274 100644
--- a/heap.el
+++ b/heap.el
@@ -297,7 +297,7 @@ to 1.5"
(make-vector
(1- (ceiling (* size (1- (heap--resize heap)))))
nil)))
- (heap--set-size heap (* 2 size)))
+ (heap--set-size heap (ceiling (* size (heap--resize heap)))))
(setq count (heap--set-count heap (1+ (heap--count heap))))
(heap--sift-up heap (1- count)))
;; return inserted data