From d936f86f04c30ea496fb83099a805ec58d10a3db Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 25 Sep 2012 21:16:03 +0200 Subject: [PATCH] fix shortcuts beyond last one --- unireader.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/unireader.lua b/unireader.lua index 4e85f2950..19109edca 100644 --- a/unireader.lua +++ b/unireader.lua @@ -2957,8 +2957,13 @@ function UniReader:addAllCommands() end end - if link and links[link] ~= nil and links[link].page ~= nil then - goto_page = links[ link + shortcut_offset ].page + 1 + if link then + link = link + shortcut_offset + if links[link] ~= nil and links[link].page ~= nil then + goto_page = links[link].page + 1 + else + Debug("missing link", link) + end end Debug("goto_page", goto_page, "now on", unireader.pageno, "link", link)