html: fix parser to handle empty documents

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2023-11-29 12:04:17 +01:00
parent 14e6bec509
commit 571463b22c

View File

@ -2259,7 +2259,7 @@ namespace stdex
token_t::complete, token_t::complete,
nullptr, 0, nullptr, 0,
text_type, text_type,
m_offset->get())); m_offset != end ? m_offset->get() : nullptr));
while (m_offset != end) { while (m_offset != end) {
auto& s = *m_offset; auto& s = *m_offset;