Fixed heap removal bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Mon, 14 Feb 2022 16:47:45 +0000 (17:47 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Mon, 14 Feb 2022 16:47:45 +0000 (17:47 +0100)
src/jagi/event/Heap.java

index aec2991..e807c31 100644 (file)
@@ -71,6 +71,7 @@ public class Heap<V, K> {
            return(null);
        V ret = val(0);
        remove(0);
+       index.remove(ret);
        return(ret);
     }
 
@@ -79,6 +80,7 @@ public class Heap<V, K> {
            throw(new NoSuchElementException());
        V ret = val(0);
        remove(0);
+       index.remove(ret);
        return(ret);
     }