fix BB team chat
This commit is contained in:
@@ -3257,7 +3257,7 @@ struct C_AddOrRemoveTeamMember_BB_03EA_05EA {
|
|||||||
// 07EA: Team chat
|
// 07EA: Team chat
|
||||||
|
|
||||||
struct SC_TeamChat_BB_07EA {
|
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
|
// It seems there are no real limits on the message length, other than the
|
||||||
// overall command length limit of 0x7C00 bytes.
|
// overall command length limit of 0x7C00 bytes.
|
||||||
// Text follows here
|
// Text follows here
|
||||||
|
|||||||
@@ -4485,7 +4485,7 @@ static void on_EA_BB(shared_ptr<Client> c, uint16_t command, uint32_t flag, stri
|
|||||||
case 0x07EA: { // Team chat
|
case 0x07EA: { // Team chat
|
||||||
auto team = c->team();
|
auto team = c->team();
|
||||||
if (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);
|
static const string required_end("\0\0", 2);
|
||||||
if (ends_with(data, required_end)) {
|
if (ends_with(data, required_end)) {
|
||||||
for (const auto& it : team->members) {
|
for (const auto& it : team->members) {
|
||||||
|
|||||||
Reference in New Issue
Block a user