Fixes bug when trying to detect the charset of the first 1024 bytes of the page. Since this is an invalid HTML, it was crashing here.

This commit is contained in:
Vitor Pamplona
2025-05-03 16:15:20 -04:00
parent 560a9ba471
commit 38bb39a407

View File

@@ -82,6 +82,7 @@ object MetaTagsParser {
fun nextTag(): RawTag? { fun nextTag(): RawTag? {
skipWhile { it != '<' } skipWhile { it != '<' }
if (this.exhausted()) return null
consume() consume()
// read tag name // read tag name