diff options
author | wustho <benawiadha@gmail.com> | 2020-04-17 21:05:48 +0700 |
---|---|---|
committer | wustho <benawiadha@gmail.com> | 2020-04-17 21:05:48 +0700 |
commit | b4a5cf84b56b4af1f35f95992830a7ccde4334b9 (patch) | |
tree | 1358390ae29653d5addc31e085d0d5f5f947ec9a /epy.py | |
parent | 3848d56d21a8e429a9997643c70de613f7f7f7fb (diff) | |
download | epy-b4a5cf84b56b4af1f35f95992830a7ccde4334b9.tar.gz |
Fix IndexError when BeginningofCh was pressed while toc_entries=[[],[],[]].
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1131,7 +1131,7 @@ def reader(ebook, index, width, y, pctg, sect): ntoc = find_curr_toc_id(toc_idx, toc_sect, toc_secid, index, y) try: y = toc_secid[toc_sect[ntoc]] - except KeyError: + except (KeyError, IndexError): y = 0 elif k in K["EndOfCh"]: ntoc = find_curr_toc_id(toc_idx, toc_sect, toc_secid, index, y) |