mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-29 16:07:14 +00:00
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:
@@ -56,7 +56,9 @@ void GuildCommands::Chat(Entity* entity, const SystemAddress& sysAddr, const std
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// With its terminating zero, as the client sends chat: members' clients read the text up to that zero
|
||||||
auto text = GeneralUtils::UTF8ToUTF16(message);
|
auto text = GeneralUtils::UTF8ToUTF16(message);
|
||||||
|
text.push_back(u'\0');
|
||||||
ChatPackets::GeneralChatMessage chat;
|
ChatPackets::GeneralChatMessage chat;
|
||||||
chat.playerID = entity->GetObjectID();
|
chat.playerID = entity->GetObjectID();
|
||||||
chat.chatChannel = eChatChannel::GUILD;
|
chat.chatChannel = eChatChannel::GUILD;
|
||||||
|
|||||||
Reference in New Issue
Block a user