fix bug in leaf function
This commit is contained in:
parent
a0f3b12ece
commit
ca3750e6d7
1 changed files with 2 additions and 1 deletions
|
@ -100,8 +100,9 @@ bool TreeNode::covered() {
|
|||
}
|
||||
|
||||
bool SegmentTree::is_leaf(Index node_idx) {
|
||||
return node_idx > _num_meta_nodes;
|
||||
return node_idx >= _num_meta_nodes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif //PROG_SEGMENT_TREE_H
|
||||
|
|
Loading…
Reference in a new issue