From 7d008bf622049da69d55ac71f6f534900b980047 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Tue, 12 Jun 2012 15:59:35 +0800 Subject: [PATCH] fix end_position calculation in Menu:onNextPage --- frontend/ui/menu.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/ui/menu.lua b/frontend/ui/menu.lua index dce6565bd..2e7ca6fdf 100644 --- a/frontend/ui/menu.lua +++ b/frontend/ui/menu.lua @@ -357,6 +357,9 @@ function Menu:onNextPage() elseif self.page == self.page_num then -- on the last page, we check if we're on the last item local end_position = #self.item_table % self.perpage + if end_position == 0 then + end_position = self.perpage + end if end_position ~= self.selected.y then self:updateItems(end_position) end