fixed bug causing an out of index crash in YACReader(stand alone) when lastPageRead(from file bookmarks) >= numPages.lenght()

This commit is contained in:
Luis Ángel San Martín 2015-06-17 21:06:05 +02:00
parent 537f8fbd76
commit b68596e606

View File

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