Fix: crash when incorrect value in input page number

This commit is contained in:
robert00s
2017-08-06 11:57:20 +02:00
committed by Frans de Jonge
parent b4167672fd
commit 7919026a19
2 changed files with 2 additions and 2 deletions

View File

@@ -295,7 +295,7 @@ function KeyValuePage:init()
end,
callback = function(input)
local page = tonumber(input)
if page >= 1 and page <= self.pages then
if page and page >= 1 and page <= self.pages then
self:goToPage(page)
end
end,

View File

@@ -445,7 +445,7 @@ function Menu:init()
end,
callback = function(input)
local page = tonumber(input)
if page >= 1 and page <= self.page_num then
if page and page >= 1 and page <= self.page_num then
self:onGotoPage(page)
end
end,