diff --git a/lisp/l/hashtab.l b/lisp/l/hashtab.l index 525b9ce5d..047482991 100644 --- a/lisp/l/hashtab.l +++ b/lisp/l/hashtab.l @@ -48,15 +48,15 @@ (when (> count (/ size rehash-size)) (send self :extend) (setq entry (send self :find sym)) ) - (inc count) - (setq entry (- entry size))) + (setq entry (- entry size)) + (if (eq (svref key entry) empty) + (inc count))) (svset key entry sym) (svset value entry val) val)) (:delete (sym) (let ((pos (send self :find sym)) (i 0)) (when (< pos size) - (dec count) (svset key pos deleted) (svset value pos nil))) ) (:extend ()