Skip to content
Snippets Groups Projects
Commit 6cf8da85 authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Fix off-by-one bug in number of children calculation.

parent b2daa020
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ reverse_tree_info(int rank, int num_nodes, int width,
*depth = 0;
search_tree(rank, 0, max_children, width, &p, &c, depth);
if ((rank + c) > num_nodes)
if ((rank + c) >= num_nodes)
c = num_nodes - rank - 1;
*parent = p;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment