Update packet_chat.c

Increase remoteMessage to 500 and remoteMessageLength to 499, respectively, to accommodate the previous (and tragically incomplete) chat character limit increase.
This commit is contained in:
occamsaturn 2025-12-15 20:12:51 -08:00 committed by GitHub
parent 983932214a
commit c7a85a4cfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,12 +78,12 @@ void network_send_chat(char* message, u8 globalIndex) {
void network_receive_chat(struct Packet* p) {
u16 remoteMessageLength = 0;
char remoteMessage[256] = { 0 };
char remoteMessage[500] = { 0 };
u8 globalIndex;
packet_read(p, &globalIndex, sizeof(u8));
packet_read(p, &remoteMessageLength, sizeof(u16));
if (remoteMessageLength >= 255) { remoteMessageLength = 255; }
if (remoteMessageLength >= 499) { remoteMessageLength = 499; }
packet_read(p, &remoteMessage, remoteMessageLength * sizeof(u8));
// anti spoof