fix shortcuts beyond last one

This commit is contained in:
Dobrica Pavlinusic
2012-09-25 21:16:03 +02:00
parent 88828fd478
commit d936f86f04

View File

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