diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-06-27 16:09:26 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-07-21 15:28:41 +0200 |
commit | 35e3fcec9332ff096ebcbab5403af999f01a4690 (patch) | |
tree | fdd4be5090474ae20f0ccd6321639040e5d77fb4 /source | |
parent | 9ee31abfa2825b6e891bd0b4ceb87fc3b3e05f41 (diff) | |
download | mupdf-35e3fcec9332ff096ebcbab5403af999f01a4690.tar.xz |
Distinguish hash slot overwrite cases.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/hash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/fitz/hash.c b/source/fitz/hash.c index fa7ce93f..af95ba9c 100644 --- a/source/fitz/hash.c +++ b/source/fitz/hash.c @@ -121,7 +121,10 @@ do_hash_insert(fz_context *ctx, fz_hash_table *table, const void *key, void *val if (memcmp(key, ents[pos].key, table->keylen) == 0) { /* This is legal, but should rarely happen. */ - fz_warn(ctx, "assert: overwrite hash slot"); + if (val != ents[pos].val) + fz_warn(ctx, "assert: overwrite hash slot with different value!"); + else + fz_warn(ctx, "assert: overwrite hash slot with same value"); return ents[pos].val; } |