diff --git a/lib/Epub/Epub/Section.cpp b/lib/Epub/Epub/Section.cpp index 56daeed0..10d2b4f3 100644 --- a/lib/Epub/Epub/Section.cpp +++ b/lib/Epub/Epub/Section.cpp @@ -17,7 +17,7 @@ namespace { // v30: Arabic shaping changed both drawing and measurement (getTextAdvanceX now // measures the shaped visual text); cached word positions from v29 no longer // match what drawText renders. -constexpr uint8_t SECTION_FILE_VERSION = 30; +constexpr uint8_t SECTION_FILE_VERSION = 31; // Written into the version field while a build is in progress; patched to // SECTION_FILE_VERSION only when the build is finalized. An abandoned / // crash-interrupted .bin therefore carries version 0, which loadSectionFile rejects diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp index 2ec1d2c2..a686b366 100644 --- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp +++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp @@ -1154,12 +1154,14 @@ void XMLCALL ChapterHtmlSlimParser::characterData(void* userData, const XML_Char } self->partWordBufferIndex = safeLen; self->flushPartWordBuffer(); + self->nextWordContinues = true; for (int j = 0; j < overflow; j++) { self->partWordBuffer[j] = saved[j]; } self->partWordBufferIndex = overflow; } else { self->flushPartWordBuffer(); + self->nextWordContinues = true; } }