Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed problem with kb_itr_get always returns iterator same as kb_itr_first #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kbtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ typedef struct {
itr->p->x = b->root; itr->p->i = 0; \
while (itr->p->x) { \
i = __kb_getp_aux_##name(itr->p->x, k, &r); \
if (i >= 0 && r == 0) return 0; \
if (i >= 0 && r == 0) { \
itr->p->i = i; \
return 0; \
} \
if (itr->p->x->is_internal == 0) return -1; \
itr->p[1].x = __KB_PTR(b, itr->p->x)[i + 1]; \
itr->p[1].i = i; \
Expand Down