summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.cpp
diff options
context:
space:
mode:
authorSeppe Degryse <80254822+Griezn@users.noreply.github.com>2023-06-08 08:13:08 +0200
committerGitHub <noreply@github.com>2023-06-08 08:13:08 +0200
commit4fe144de352434ff6e98a4269777b82e8b03f4d0 (patch)
tree6278545a5b10369c1175a058414dc13cb21f500c /src/Protocol/ProtocolRecognizer.cpp
parentUpdate clang-tidy.sh (#5477) (diff)
downloadcuberite-4fe144de352434ff6e98a4269777b82e8b03f4d0.tar
cuberite-4fe144de352434ff6e98a4269777b82e8b03f4d0.tar.gz
cuberite-4fe144de352434ff6e98a4269777b82e8b03f4d0.tar.bz2
cuberite-4fe144de352434ff6e98a4269777b82e8b03f4d0.tar.lz
cuberite-4fe144de352434ff6e98a4269777b82e8b03f4d0.tar.xz
cuberite-4fe144de352434ff6e98a4269777b82e8b03f4d0.tar.zst
cuberite-4fe144de352434ff6e98a4269777b82e8b03f4d0.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 8bfc18330..fa106342f 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -229,7 +229,7 @@ void cMultiVersionProtocol::SendDisconnect(cClientHandle & a_Client, const AStri
return;
}
- const AString Message = fmt::format(FMT_STRING("{{\"text\":\"{}\"}}"), EscapeString(a_Reason));
+ const AString Message = JsonUtils::SerializeSingleValueJsonObject("text", a_Reason);
const auto PacketID = GetPacketID(cProtocol::ePacketType::pktDisconnectDuringLogin);
cByteBuffer Out(
cByteBuffer::GetVarIntSize(PacketID) +