From 06b6940db00ee28a9aee4f746470a1ee78f6e33e Mon Sep 17 00:00:00 2001 From: wolf109909 <84360921+wolf109909@users.noreply.github.com> Date: Mon, 7 Feb 2022 08:32:37 +0800 Subject: fixed servername and desc (#68) --- NorthstarDedicatedTest/masterserver.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp index 9d50eda5..fffda69b 100644 --- a/NorthstarDedicatedTest/masterserver.cpp +++ b/NorthstarDedicatedTest/masterserver.cpp @@ -92,7 +92,12 @@ std::string unescape_unicode(const std::string& str) result.push_back(cp & ((1 << 6) - 1) | 0b10000000 & (~(1 << 6))); } } - result.append(last_match.suffix()); + if (!last_match.ready()) { + return str; + } + else { + result.append(last_match.suffix()); + } return result; } -- cgit v1.2.3