mirror of
https://github.com/urbit/ares.git
synced 2024-12-24 05:44:36 +03:00
pma: fix _bt_delco hiidx iteration
This commit is contained in:
parent
81f58631e1
commit
10ed711da5
@ -705,7 +705,7 @@ _bt_delco_1pass_0(BT_state *state, vaof_t lo, vaof_t hi,
|
||||
}
|
||||
|
||||
/* and then the entry that matches hi */
|
||||
for (; i < N-1; i++) {
|
||||
for (; i < N; i++) {
|
||||
vaof_t hhi = node->datk[i].va;
|
||||
if (hhi >= hi) {
|
||||
hiidx = hi;
|
||||
@ -1038,7 +1038,7 @@ _bt_delco_trim_rsubtree_lhs2(BT_state *state, vaof_t lo, vaof_t hi,
|
||||
|
||||
/* find hi idx of range */
|
||||
size_t i;
|
||||
for (i = 0; i < N-1; i++) {
|
||||
for (i = 0; i < N; i++) {
|
||||
vaof_t hhi = node->datk[i].va;
|
||||
if (hhi >= hi) {
|
||||
hiidx = i;
|
||||
@ -1169,7 +1169,7 @@ _bt_delco(BT_state *state, vaof_t lo, vaof_t hi,
|
||||
}
|
||||
|
||||
/* find high idx of range */
|
||||
for (size_t i = loidx; i < N-1; i++) {
|
||||
for (size_t i = loidx; i < N; i++) {
|
||||
vaof_t hhi = node->datk[i].va;
|
||||
if (hhi >= hi) {
|
||||
assert(i > 0);
|
||||
@ -2745,7 +2745,7 @@ _bt_dirty(BT_state *state, vaof_t lo, vaof_t hi, pgno_t nodepg,
|
||||
assert(loidx != 0);
|
||||
|
||||
/* find hiidx of range */
|
||||
for (size_t i = loidx; i < N-1; i++) {
|
||||
for (size_t i = loidx; i < N; i++) {
|
||||
vaof_t hhi = node->datk[i+1].va;
|
||||
if (hhi >= hi) {
|
||||
hiidx = i;
|
||||
|
Loading…
Reference in New Issue
Block a user