]> git.eshelyaron.com Git - emacs.git/commit
Only use a hash index size of 1 for tables with size 0 (bug#68244)
authorMattias Engdegård <mattiase@acm.org>
Thu, 18 Jan 2024 17:45:16 +0000 (18:45 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 18 Jan 2024 17:56:26 +0000 (18:56 +0100)
commitef01250ef9c22aa1ac2ecff3136aabf79b2a677b
treeecbbbd985351cb27c10ad9b7414408eba44a5067
parent2c887f497c723c2397888e2f406faa4de3a8208a
Only use a hash index size of 1 for tables with size 0 (bug#68244)

This invariant was intended but insufficiently enforced which could
lead to an assertion failure.

* src/fns.c (hash_index_size): Assume size>0, and return a value >1.
(make_hash_table): Only use hash_index_size for size>0.
src/fns.c