diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-08 21:24:02 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-08 21:24:02 +0200 |
commit | 1017f8c6cbfc4d567bd48c9ed28bd53a0f337eea (patch) | |
tree | 1e2010f6117d9f31be653b5c98ea8f6a604f1e77 /termui | |
parent | 929d7093644e4f6b83ef366b83b5b66be075736e (diff) | |
download | git-bug-1017f8c6cbfc4d567bd48c9ed28bd53a0f337eea.tar.gz |
termui: fix an out of bound panic
Diffstat (limited to 'termui')
-rw-r--r-- | termui/bug_table.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go index f300c422..fc5e6aa1 100644 --- a/termui/bug_table.go +++ b/termui/bug_table.go @@ -209,7 +209,7 @@ func (bt *bugTable) paginate(max int) error { func (bt *bugTable) doPaginate(allIds []string, max int) error { // clamp the cursor bt.pageCursor = maxInt(bt.pageCursor, 0) - bt.pageCursor = minInt(bt.pageCursor, len(allIds)-1) + bt.pageCursor = minInt(bt.pageCursor, len(allIds)) nb := minInt(len(allIds)-bt.pageCursor, max) |