From 1017f8c6cbfc4d567bd48c9ed28bd53a0f337eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Wed, 8 Aug 2018 21:24:02 +0200 Subject: [PATCH] termui: fix an out of bound panic --- termui/bug_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termui/bug_table.go b/termui/bug_table.go index f300c42227cd2df94794f84a6769baae501ab066..fc5e6aa19034133f567999a0ce72a74b76b4f3d1 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)