From 20474ce4116f14dd84f7b50e9e60e6ec293bd578 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Wed, 7 Mar 2012 07:37:45 +0800 Subject: [PATCH] fix: page number in fast jump in percent use math.floor to convert page number to integer --- unireader.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unireader.lua b/unireader.lua index 9a86e1ae4..a1459ddbb 100644 --- a/unireader.lua +++ b/unireader.lua @@ -544,21 +544,21 @@ function UniReader:inputloop() elseif ev.code == KEY_1 then self:goto(1) elseif ev.code == KEY_2 then - self:goto(self.doc:getPages()/90*10) + self:goto(math.floor(self.doc:getPages()/90*10)) elseif ev.code == KEY_3 then - self:goto(self.doc:getPages()/90*20) + self:goto(math.floor(self.doc:getPages()/90*20)) elseif ev.code == KEY_4 then - self:goto(self.doc:getPages()/90*30) + self:goto(math.floor(self.doc:getPages()/90*30)) elseif ev.code == KEY_5 then - self:goto(self.doc:getPages()/90*40) + self:goto(math.floor(self.doc:getPages()/90*40)) elseif ev.code == KEY_6 then - self:goto(self.doc:getPages()/90*50) + self:goto(math.floor(self.doc:getPages()/90*50)) elseif ev.code == KEY_7 then - self:goto(self.doc:getPages()/90*60) + self:goto(math.floor(self.doc:getPages()/90*60)) elseif ev.code == KEY_8 then - self:goto(self.doc:getPages()/90*70) + self:goto(math.floor(self.doc:getPages()/90*70)) elseif ev.code == KEY_9 then - self:goto(self.doc:getPages()/90*80) + self:goto(math.floor(self.doc:getPages()/90*80)) elseif ev.code == KEY_0 then self:goto(self.doc:getPages()) elseif ev.code == KEY_A then