diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
index 50ceb86f..5991dbff 100644
--- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
+++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
@@ -554,10 +554,8 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
}
}
- // Track ul/ol nesting so li markers can be numbered or bulleted accordingly
if (strcmp(name, "ul") == 0 || strcmp(name, "ol") == 0) {
- self->listStack.push_back({self->depth, strcmp(name, "ol") == 0, 0});
- // fall through to depth increment
+ self->listStack.push_back({self->depth, name[0] == 'o', 0});
}
const float emSize = static_cast(self->renderer.getFontAscenderSize(self->fontId));
@@ -592,7 +590,7 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
self->listStack.back().counter += 1;
snprintf(marker, sizeof(marker), "%d.", self->listStack.back().counter);
} else {
- strncpy(marker, "\xe2\x80\xa2", sizeof(marker));
+ strcpy(marker, "\xe2\x80\xa2");
}
self->currentTextBlock->addWord(marker, EpdFontFamily::REGULAR);
}
diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.h b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.h
index dec13ca0..3084708c 100644
--- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.h
+++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.h
@@ -70,7 +70,6 @@ class ChapterHtmlSlimParser {
int tableRowIndex = 0;
int tableColIndex = 0;
- // List nesting tracking for ul/ol markers
struct ListEntry {
int depth;
bool isOrdered;