From 14801fb60f4478d46262fbc9b8981e56a717b47d Mon Sep 17 00:00:00 2001 From: occamsaturn <88759801+occamsaturn@users.noreply.github.com> Date: Tue, 16 Dec 2025 13:07:27 -0800 Subject: [PATCH] Update packet_chat.c --- src/pc/network/packets/packet_chat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pc/network/packets/packet_chat.c b/src/pc/network/packets/packet_chat.c index 346e350b8..78123c865 100644 --- a/src/pc/network/packets/packet_chat.c +++ b/src/pc/network/packets/packet_chat.c @@ -78,12 +78,12 @@ void network_send_chat(char* message, u8 globalIndex) { void network_receive_chat(struct Packet* p) { u16 remoteMessageLength = 0; - char remoteMessage[500] = { 0 }; + char remoteMessage[MAX_CHAT_MSG_LENGTH] = { 0 }; u8 globalIndex; packet_read(p, &globalIndex, sizeof(u8)); packet_read(p, &remoteMessageLength, sizeof(u16)); - if (remoteMessageLength >= 499) { remoteMessageLength = 499; } + if (remoteMessageLength >= MAX_CHAT_MSG_LENGTH - 1) { remoteMessageLength = MAX_CHAT_MSG_LENGTH - 1; } packet_read(p, &remoteMessage, remoteMessageLength * sizeof(u8)); // anti spoof