From 8487d907951c16dbba2b1d6f44d035ea3461ba78 Mon Sep 17 00:00:00 2001 From: Nick Renieris Date: Fri, 24 Jun 2022 03:18:40 +0300 Subject: [PATCH] packets/PlayerConnect: Initialize maxPlayerCount It was sending bad data since it wasn't getting inited anywhere. --- include/packets/PlayerConnect.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/packets/PlayerConnect.h b/include/packets/PlayerConnect.h index 52acbea..f3ea37c 100644 --- a/include/packets/PlayerConnect.h +++ b/include/packets/PlayerConnect.h @@ -2,9 +2,11 @@ #include "Packet.h" +#include + struct PACKED PlayerConnect : Packet { PlayerConnect() : Packet() {this->mType = PacketType::PLAYERCON; mPacketSize = sizeof(PlayerConnect) - sizeof(Packet);}; ConnectionTypes conType; - u16 maxPlayerCount; + u16 maxPlayerCount = USHRT_MAX; char clientName[COSTUMEBUFSIZE] = {}; }; \ No newline at end of file