aboutsummaryrefslogtreecommitdiffstats
path: root/c_ldirs.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
commitbc7effa71d5d7329af950aca3143bc01b84201c3 (patch)
tree767c71d05a750394aa6ae50bb9d413f6c3e9b7ec /c_ldirs.go
parentok (diff)
downloadhardflip-bc7effa71d5d7329af950aca3143bc01b84201c3.tar.gz
hardflip-bc7effa71d5d7329af950aca3143bc01b84201c3.tar.bz2
hardflip-bc7effa71d5d7329af950aca3143bc01b84201c3.tar.xz
hardflip-bc7effa71d5d7329af950aca3143bc01b84201c3.tar.zst
hardflip-bc7effa71d5d7329af950aca3143bc01b84201c3.zip
i think its good? pls
Diffstat (limited to '')
-rw-r--r--c_ldirs.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index d7a98a1..77f017d 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -155,6 +155,9 @@ func (dir *DirsNode) count_hosts() int {
}
func (ldirs *DirsList) prev(dir *DirsNode) *DirsNode {
+ if ldirs.head == dir {
+ return dir
+ }
for ptr := ldirs.head; ptr != nil; ptr = ptr.next {
if ptr.next == dir {
return ptr