fix BB team chat

This commit is contained in:
Martin Michelsen
2023-11-26 16:18:51 -08:00
parent e484ad72e0
commit 654132b5d2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -3257,7 +3257,7 @@ struct C_AddOrRemoveTeamMember_BB_03EA_05EA {
// 07EA: Team chat
struct SC_TeamChat_BB_07EA {
pstring<TextEncoding::UTF16, 0x20> sender_name;
pstring<TextEncoding::UTF16, 0x10> sender_name;
// It seems there are no real limits on the message length, other than the
// overall command length limit of 0x7C00 bytes.
// Text follows here
+1 -1
View File
@@ -4485,7 +4485,7 @@ static void on_EA_BB(shared_ptr<Client> c, uint16_t command, uint32_t flag, stri
case 0x07EA: { // Team chat
auto team = c->team();
if (team) {
check_size_v(data.size(), sizeof(SC_TeamChat_BB_07EA) + 4);
check_size_v(data.size(), sizeof(SC_TeamChat_BB_07EA) + 4, 0xFFFF);
static const string required_end("\0\0", 2);
if (ends_with(data, required_end)) {
for (const auto& it : team->members) {