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 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 07:52:50 -05:00
parent 7066860067
commit cf6c5280ed

View File

@@ -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;