Skip to content

Commit

Permalink
bugfix : off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
xant committed Feb 27, 2014
1 parent 061efcd commit 54e33ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/binheap.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ binomial_tree_node_destroy(binomial_tree_node_t *node)
if (child_index < node->num_children - 1) {
memcpy(&node->children[child_index],
&node->children[child_index + 1],
sizeof(binomial_tree_node_t *) * (node->num_children - child_index + 1));
sizeof(binomial_tree_node_t *) * (node->num_children - (child_index + 1)));

}
node->num_children--;
Expand Down

0 comments on commit 54e33ea

Please sign in to comment.