From c81992de2c59d575d26257671ba07ea72972481a Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Tue, 28 Aug 2012 16:36:54 +0200 Subject: [PATCH] The pev page can be the first one --- reader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reader.go b/reader.go index 5f857c7..515dad8 100644 --- a/reader.go +++ b/reader.go @@ -103,10 +103,10 @@ func chapterList(e *epub.Epub, file string, id string, base string) (string, str /* if is the same chapter check the previous */ i := activeIndx-1 - for i > 0 && strings.Contains(chapters[i].Link, "#") { + for i >= 0 && strings.Contains(chapters[i].Link, "#") { i-- } - if i > 0 { + if i >= 0 { prev = chapters[i].Link } i = activeIndx+1