emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/heap 55d47fd 11/31: Fixed ancient but overlooked bug in


From: Stefan Monnier
Subject: [elpa] externals/heap 55d47fd 11/31: Fixed ancient but overlooked bug in heap resizing in heap-add.
Date: Mon, 14 Dec 2020 12:13:34 -0500 (EST)

branch: externals/heap
commit 55d47fd2945c296ac7e311413017d3e7eaccdc3b
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]