diff options
Diffstat (limited to 'libhashtable/libhashtable.c')
-rw-r--r-- | libhashtable/libhashtable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libhashtable/libhashtable.c b/libhashtable/libhashtable.c index e304a68..38b4ad3 100644 --- a/libhashtable/libhashtable.c +++ b/libhashtable/libhashtable.c @@ -88,6 +88,7 @@ void ht_freevalues(struct hashtable *ht) { //this seems too complicated. int ht_setkey(struct hashtable *ht,char *key,void *value) { + if(!key) key="(null)"; unsigned short h=hash(key); struct entry *tmp; int i; |