aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/tags/tags.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/tags/tags.go b/modules/tags/tags.go
index 650fa4e..4019f8a 100644
--- a/modules/tags/tags.go
+++ b/modules/tags/tags.go
@@ -2,6 +2,7 @@ package tags
2 2
3import ( 3import (
4 "log" 4 "log"
5 "math"
5 "net/http" 6 "net/http"
6 "strconv" 7 "strconv"
7 8
@@ -77,7 +78,7 @@ func (m *Module) viewTagPage(w http.ResponseWriter, r *http.Request, p httproute
77 http.Redirect(w, r, "/", 302) 78 http.Redirect(w, r, "/", 302)
78 return 79 return
79 } 80 }
80 pageCount := (int)((float64)(pageNum)/12.0 + 0.5) 81 pageCount := (int)(math.Ceil(float64(pageNum) / 12.0))
81 82
82 if pageNumber > pageCount { 83 if pageNumber > pageCount {
83 pageNumber = pageCount 84 pageNumber = pageCount