From 662a3769262df8e8e2c0e5b4e9fc9544fe140b7b Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:52:52 +1100 Subject: [PATCH] Update StarDirectives.cpp --- source/core/StarDirectives.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp index b72e8ee..ea9d565 100644 --- a/source/core/StarDirectives.cpp +++ b/source/core/StarDirectives.cpp @@ -161,8 +161,10 @@ StringView Directives::prefix() const { return ""; else if (m_shared->empty()) return m_shared->string; + else if (m_shared->string.utf8().at(0) == '?') + return ""; else - return StringView(m_shared->string).substr(0, m_shared->entries.begin()->begin); + return m_shared->entries.front().string(*m_shared); } String Directives::string() const {