diff --git a/cmd/root.go b/cmd/root.go index c5863e5..2f34c1e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,7 @@ var ( ) const ( - Version string = "0.59.2" + Version string = "0.59.3" ) var ( diff --git a/cmd/web.go b/cmd/web.go index a77ccd4..1d41653 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -692,8 +692,11 @@ func serveDebugHtml(args []string, index *Index, paginate bool) httprouter.Handl } if pageLength != 0 { nextPage := page + 1 - if nextPage > (fileCount / int(pageLength)) { + + if nextPage > (fileCount/int(pageLength)) && fileCount%int(pageLength) == 0 { nextPage = fileCount / int(pageLength) + } else if nextPage > (fileCount / int(pageLength)) { + nextPage = (fileCount / int(pageLength)) + 1 } prevPage := page - 1