diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-05-02 17:27:16 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-05-02 17:27:16 -0400 |
| commit | 26f0982c830083bc5a70a0adcdfd80bfb5b7698c (patch) | |
| tree | f95a9aa4e74e7f2385239ad48bb5693cc19daf41 | |
| parent | 37c6a51a519d46e7e3bf1ea7b3f744ffa25e9c28 (diff) | |
Fix bug where fallbacks were hashed by pointer instead of by contentsv0.2
| -rw-r--r-- | src/stdlib/tables.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/stdlib/tables.c b/src/stdlib/tables.c index c374f26f..061c3391 100644 --- a/src/stdlib/tables.c +++ b/src/stdlib/tables.c @@ -559,13 +559,12 @@ PUREFUNC public uint64_t Table$hash(const void *obj, const TypeInfo_t *type) volatile struct { int64_t length; - uint64_t keys_hash, values_hash; - Table_t *fallback; + uint64_t keys_hash, values_hash, fallback_hash; } components = { t->entries.length, keys_hash, values_hash, - t->fallback, + t->fallback ? Table$hash(t->fallback, type) : 0, }; t->hash = siphash24((void*)&components, sizeof(components)); if unlikely (t->hash == 0) |
