Fix: crash when incorrect value in input page number

pull/3055/head
robert00s 7 years ago committed by Frans de Jonge
parent b4167672fd
commit 7919026a19

@ -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,

@ -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,

Loading…
Cancel
Save