From cf6c5280ed25fe70ae01744cf201b3600624ac8f Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 29 Sep 2026 07:52:50 -0500 Subject: [PATCH] fix(guilds): guild chat keeps its terminating zero Members' clients read the chat text up to a terminating zero, as the client itself sends it; /g sent the text without one, so the client read past it and showed extra characters ("test0>"). Check: guild chat shows exactly what was typed. Co-Authored-By: Claude Opus 5.5 --- dGame/dUtilities/SlashCommands/GuildCommands.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dGame/dUtilities/SlashCommands/GuildCommands.cpp b/dGame/dUtilities/SlashCommands/GuildCommands.cpp index ea71ea4de..0b26a7d29 100644 --- a/dGame/dUtilities/SlashCommands/GuildCommands.cpp +++ b/dGame/dUtilities/SlashCommands/GuildCommands.cpp @@ -56,7 +56,9 @@ void GuildCommands::Chat(Entity* entity, const SystemAddress& sysAddr, const std return; } + // With its terminating zero, as the client sends chat: members' clients read the text up to that zero auto text = GeneralUtils::UTF8ToUTF16(message); + text.push_back(u'\0'); ChatPackets::GeneralChatMessage chat; chat.playerID = entity->GetObjectID(); chat.chatChannel = eChatChannel::GUILD;