Skip to content

Commit a0dbc4e

Browse files
committed
fix segfault when running the Py benchmark
1 parent fc0a47e commit a0dbc4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

c/tskit/trees.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4632,8 +4632,8 @@ tsk_tree_seek_from_null(tsk_tree_t *self, double x, tsk_flags_t TSK_UNUSED(optio
46324632
}
46334633
}
46344634
k = 0;
4635-
while (k >= 0 && k < (tsk_id_t) num_edges && edge_right[removal[k]] <= x) {
4636-
k--;
4635+
while (k < (tsk_id_t) num_edges && edge_right[removal[k]] <= x) {
4636+
k++;
46374637
}
46384638

46394639
/* NOTE: tsk_search_sorted finds the first the first

0 commit comments

Comments
 (0)