Skip to content

Commit

Permalink
nctree: goto_first_item() true first #1164
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Feb 22, 2021
1 parent 2c3cb52 commit e69be24
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/lib/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,9 @@ dup_tree_items(nctree_int_item* fill, const nctree_item* items, unsigned count,

static void
goto_first_item(nctree* n){
nctree_int_item* nii = &n->items;
int c = 0;
while(nii->subcount){
n->currentpath[c++] = 0;
nii = &nii->subs[0];
}
n->currentpath[c] = UINT_MAX;
n->curitem = nii;
n->currentpath[0] = 0;
n->currentpath[1] = UINT_MAX;
n->curitem = &n->items.subs[0];
n->activerow = 0;
}

Expand Down

0 comments on commit e69be24

Please sign in to comment.