mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Input: Fix regression caused by KF8 support that broke reading on ancient PRC files from Baen
This commit is contained in:
parent
43cf8faebc
commit
9712175d74
@ -186,7 +186,7 @@ class BookHeader(object):
|
|||||||
if len(raw) >= 0xF8:
|
if len(raw) >= 0xF8:
|
||||||
self.ncxidx, = struct.unpack_from(b'>L', raw, 0xF4)
|
self.ncxidx, = struct.unpack_from(b'>L', raw, 0xF4)
|
||||||
|
|
||||||
if self.mobi_version >= 8:
|
if self.mobi_version == 8 and len(raw) >= (0xF8 + 16):
|
||||||
self.dividx, self.skelidx, self.datpidx, self.othidx = \
|
self.dividx, self.skelidx, self.datpidx, self.othidx = \
|
||||||
struct.unpack_from(b'>4L', raw, 0xF8)
|
struct.unpack_from(b'>4L', raw, 0xF8)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user