Skip to content

Commit

Permalink
Tweaked search
Browse files Browse the repository at this point in the history
  • Loading branch information
jalpotato committed May 7, 2012
1 parent fb7bda8 commit 0ae80fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trees.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function bp_tree(order){
this.bp_leaf_split = bp_leaf_split;
this.search_val = bp_search;
this.delete_val = bp_delete;
this.last_highlight = 0;
//this.getChildren = getChildren;
}

Expand Down Expand Up @@ -418,7 +419,8 @@ function b_search(value, start){
child++;
}
}
if(this.nodes[current_node].numChildren<= child){
if(this.nodes[current_node].children.length<= child){
console.log("peculiarity");
return new result(current_node,false);
}
current_node = this.nodes[current_node].children[child];
Expand Down

0 comments on commit 0ae80fa

Please sign in to comment.