Output post 264 bytes data in the MOBI header correctly when dumping

This commit is contained in:
Kovid Goyal 2014-03-29 11:57:28 +05:30
parent b29ff973a2
commit cdba7784f3

View File

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