From e1894f0e52ea7ed5ebcb3809c1402842743fa7f9 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Wed, 12 May 2021 16:20:19 -0400 Subject: [PATCH] dir: Fix assignment of Prev field --- dir.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir.go b/dir.go index 07ac7a1..322e6d8 100644 --- a/dir.go +++ b/dir.go @@ -277,7 +277,7 @@ func (d *Dir) sort() { }) for i := range d.Pages { - if i-1 > 0 { + if i-1 >= 0 { d.Pages[i].Prev = d.Pages[i-1] } if i+1 < len(d.Pages) {