diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2001-11-19 10:41:32 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2001-11-19 10:41:32 +0000 |
commit | e554325940bef9d26a4d05cc9b8263216dd9e5fb (patch) | |
tree | ea0ef15931ada16a7930f711035678c30cddc098 /hash.c | |
parent | a8a51d7e3f9549b18c407c0a6838442afd2e5bce (diff) |
Fix #868, #876. Work-around from Len Lattanzi
<len@mss.migration.com>.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -44,6 +44,8 @@ int hash_string (const unsigned char *s, int n) HASH *hash_create (int nelem) { HASH *table = safe_malloc (sizeof (HASH)); + if (nelem == 0) + nelem = 2; table->nelem = nelem; table->table = safe_calloc (nelem, sizeof (struct hash_elem *)); return table; |