mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Output post 264 bytes data in the MOBI header correctly when dumping
This commit is contained in:
parent
b29ff973a2
commit
cdba7784f3
@ -358,7 +358,7 @@ class MOBIHeader(object): # {{{
|
|||||||
if self.length >= 248:
|
if self.length >= 248:
|
||||||
(self.sect_idx, self.skel_idx, self.datp_idx, self.oth_idx
|
(self.sect_idx, self.skel_idx, self.datp_idx, self.oth_idx
|
||||||
) = struct.unpack_from(b'>4L', self.raw, 248)
|
) = struct.unpack_from(b'>4L', self.raw, 248)
|
||||||
self.unknown9 = self.raw[264:self.length]
|
self.unknown9 = self.raw[264:self.length+16]
|
||||||
if self.meta_orth_indx not in {NULL_INDEX, self.sect_idx}:
|
if self.meta_orth_indx not in {NULL_INDEX, self.sect_idx}:
|
||||||
raise ValueError('KF8 header has different Meta orth and '
|
raise ValueError('KF8 header has different Meta orth and '
|
||||||
'section indices')
|
'section indices')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user