diff options
Diffstat (limited to 'collections/map')
| -rw-r--r-- | collections/map/map.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/collections/map/map.c b/collections/map/map.c index 0600c8b..a476a97 100644 --- a/collections/map/map.c +++ b/collections/map/map.c @@ -54,7 +54,7 @@ void *key, *val;  	if (!root)  		return -1; -	if (!key) { +	if (!root->key) {  		root->key = key;  		root->val = val;  		return 0; @@ -110,7 +110,7 @@ map *root;  void *key;  {  	int cmp; -	if (!root || !key) +	if (!root || !root->key)  		return NULL;  	cmp = root->cmp(root->key, key); | 
