From 35fd8d7894d266c4dada45cfdcebc15983836988 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 21 Nov 2021 11:15:21 +0100 Subject: [PATCH] Fix an another indexing edge case. --- core/html/html_parser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/html/html_parser.cpp b/core/html/html_parser.cpp index c21ceb4..5eaea1f 100644 --- a/core/html/html_parser.cpp +++ b/core/html/html_parser.cpp @@ -207,6 +207,11 @@ void HTMLParserTag::process() { // grab the tag itself tag = tag_text.substr(0, fspc_index); + if (fspc_index + 1 == tag_text.size()) { + //no args, but had a space like
+ return; + } + String args = tag_text.substr(fspc_index + 1, tag_text.size() - fspc_index - 1); parse_args(args); }