diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-07-04 18:48:36 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-07-04 18:48:36 -0700 |
commit | 2414f36adfae87c548d8b05e474c5ccda6df5fd6 (patch) | |
tree | 1f37fe6d330425a66f1dd00a15c25f7820628463 /struct.c | |
parent | 9aa751c8a4f845ef2d2bba091c81ffeded941afd (diff) | |
download | txr-2414f36adfae87c548d8b05e474c5ccda6df5fd6.tar.gz txr-2414f36adfae87c548d8b05e474c5ccda6df5fd6.tar.bz2 txr-2414f36adfae87c548d8b05e474c5ccda6df5fd6.zip |
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.
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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; |