From 20de634a06c0053aad4b1a0017cae4ed023b6e94 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:51:19 +1000 Subject: Improve Discord activity info requested by Omeruin! --- source/core/StarText.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/core/StarText.cpp') diff --git a/source/core/StarText.cpp b/source/core/StarText.cpp index d507fd4..749fd90 100644 --- a/source/core/StarText.cpp +++ b/source/core/StarText.cpp @@ -36,6 +36,8 @@ namespace Text { static auto stripEscapeRegex = std::regex(strf("\\{:c}[^;]*{:c}", CmdEsc, EndEsc)); String stripEscapeCodes(String const& s) { + if (s.empty()) + return s; return std::regex_replace(s.utf8(), stripEscapeRegex, ""); } -- cgit v1.2.3