From 654132b5d2d357d2219902003d33438252509587 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 26 Nov 2023 16:18:51 -0800 Subject: [PATCH] fix BB team chat --- src/CommandFormats.hh | 2 +- src/ReceiveCommands.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index 7cd1f1ec..e5ed2bb9 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -3257,7 +3257,7 @@ struct C_AddOrRemoveTeamMember_BB_03EA_05EA { // 07EA: Team chat struct SC_TeamChat_BB_07EA { - pstring sender_name; + pstring 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 diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 7a532414..b83ccc42 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -4485,7 +4485,7 @@ static void on_EA_BB(shared_ptr 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) {