Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
zedshaw committed Mar 23, 2012
1 parent 0365825 commit a9f6c6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lcthw/bstree.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static inline BSTreeNode *BSTree_node_delete(BSTree *map, BSTreeNode *node, void
if(node->left && node->right) {
BSTreeNode *successor = BSTree_find_min(node);
BSTree_replace_node_in_parent(map, node, successor->right);
} if(node->left) {
} else if(node->left) {
BSTree_replace_node_in_parent(map, node, node->left);
} else if(node->right) {
BSTree_replace_node_in_parent(map, node, node->right);
Expand Down
1 change: 1 addition & 0 deletions src/lcthw/hashmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ static inline HashmapNode *Hashmap_node_create(int hash, void *key, void *data)
node->hash = hash;

return node;

error:
return NULL;
}
Expand Down

0 comments on commit a9f6c6d

Please sign in to comment.