From 3269b8c3611ec68855f60c46c675cde2a4e3dc5e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 22 Apr 2012 10:20:47 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/mobi/writer8/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/writer8/main.py b/src/calibre/ebooks/mobi/writer8/main.py index 76492cb9a9..ffc806cb5a 100644 --- a/src/calibre/ebooks/mobi/writer8/main.py +++ b/src/calibre/ebooks/mobi/writer8/main.py @@ -337,7 +337,10 @@ class KF8Writer(object): if aid is None: continue pos, fid = self.aid_offset_map[aid] - if is_guide_ref_start(ref): + if is_guide_ref_start(ref) and fid == 0: + # If fid != 0 then we cannot represent the start position as a + # single number in the EXTH header, so we do not write it to + # EXTH self.start_offset = pos self.guide_table.append(GuideRef(ref.title or _('Unknown'), ref.type, (pos, fid)))