mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
fixed bug causing an out of index crash in YACReader(stand alone) when lastPageRead(from file bookmarks) >= numPages.lenght()
This commit is contained in:
parent
537f8fbd76
commit
b68596e606
@ -515,6 +515,10 @@ void FileComic::process()
|
||||
|
||||
if(_firstPage == -1)
|
||||
_firstPage = bm->getLastPage();
|
||||
|
||||
if(_firstPage >= _pages.length())
|
||||
_firstPage = 0;
|
||||
|
||||
_index = _firstPage;
|
||||
emit(openAt(_index));
|
||||
|
||||
@ -602,6 +606,9 @@ void FolderComic::process()
|
||||
if(_firstPage == -1)
|
||||
_firstPage = bm->getLastPage();
|
||||
|
||||
if(_firstPage >= _pages.length())
|
||||
_firstPage = 0;
|
||||
|
||||
_index = _firstPage;
|
||||
|
||||
emit(openAt(_index));
|
||||
@ -742,6 +749,10 @@ void PDFComic::process()
|
||||
|
||||
if(_firstPage == -1)
|
||||
_firstPage = bm->getLastPage();
|
||||
|
||||
if(_firstPage >= _pages.length())
|
||||
_firstPage = 0;
|
||||
|
||||
_index = _firstPage;
|
||||
emit(openAt(_index));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user