The pev page can be the first one

This commit is contained in:
Las Zenow 2012-08-28 16:36:54 +02:00
parent 2febea7d90
commit c81992de2c

View file

@ -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