aboutsummaryrefslogtreecommitdiffstats
path: root/c_litems.go
diff options
context:
space:
mode:
Diffstat (limited to 'c_litems.go')
-rw-r--r--c_litems.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/c_litems.go b/c_litems.go
index 031432d..48e9246 100644
--- a/c_litems.go
+++ b/c_litems.go
@@ -180,13 +180,14 @@ func (item *ItemsNode) get_next_level() *ItemsNode {
item_ptr := item
for item_ptr != nil {
if item_ptr.is_dir() == false {
+ item_ptr = item_ptr.next
continue
}
if item_ptr.Dirs == ptr {
- break
+ return item_ptr
}
item_ptr = item_ptr.next
}
- return item_ptr
+ return nil
}