From 8f21d43bc359fa5e33c41b4527f35b590b8ff417 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