Browse Source

fix changelog freaking out

Morgan Bazalgette 2 years ago
parent
commit
b4a1ec3266
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      loadchangelog.go

+ 6
- 0
loadchangelog.go View File

@@ -44,6 +44,12 @@ func loadChangelog(page int) []commit {
44 44
 	}
45 45
 	r := bufio.NewScanner(f)
46 46
 
47
+	if page < 0 {
48
+		page = 0
49
+	} else if page > 50000 {
50
+		page = 50000
51
+	}
52
+
47 53
 	times := (page - 1) * 50
48 54
 	if times < 0 {
49 55
 		times = 0

Loading…
Cancel
Save