From 84e9903c27ede099e2361e15b16a05c6aa4dc819 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 21 Oct 2019 19:33:13 -0700 Subject: hash: observe count in eql-based hash. * hash.c (eql_hash): Decrement count and bail if zero. --- hash.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 39173a15..f06fea61 100644 --- a/hash.c +++ b/hash.c @@ -283,6 +283,9 @@ ucnum equal_hash(val obj, int *count, ucnum seed) static ucnum eql_hash(val obj, int *count) { + if ((*count)-- <= 0) + return 0; + switch (tag(obj)) { case TAG_PTR: switch (type(obj)) { -- cgit v1.2.3