From 2414f36adfae87c548d8b05e474c5ccda6df5fd6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 4 Jul 2024 18:48:36 -0700 Subject: hash: fix: equal hashes being reduced modulo NUM_MAX. Almost exactly 6 years ago, commit 612f4f57e made hashes use the full width of the ucnum type. However, several reductions of the form hash &= NUM_MAX were forgotten. * hash.c (hash_hash_op): Eliminate reductions modulo NUM_MAX. * struct.c (struct_inst_hash): Likewise. --- struct.c | 1 - 1 file changed, 1 deletion(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index b421a265..a449e9d7 100644 --- a/struct.c +++ b/struct.c @@ -1870,7 +1870,6 @@ static ucnum struct_inst_hash(val obj, int *count, ucnum seed) for (sl = 0; sl < nslots; sl++) { ucnum hash = equal_hash(si->slot[sl], count, seed); out += hash; - out &= NUM_MAX; } return out; -- cgit v1.2.3