mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 12:01:43 +00:00
Update packet_chat.c
This commit is contained in:
parent
78883923e3
commit
14801fb60f
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue