aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/PreLoginPacket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/PreLoginPacket.cpp')
-rw-r--r--Minecraft.World/PreLoginPacket.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Minecraft.World/PreLoginPacket.cpp b/Minecraft.World/PreLoginPacket.cpp
index aa6832ca..ddcfe197 100644
--- a/Minecraft.World/PreLoginPacket.cpp
+++ b/Minecraft.World/PreLoginPacket.cpp
@@ -62,6 +62,7 @@ void PreLoginPacket::read(DataInputStream *dis) //throws IOException
m_friendsOnlyBits = dis->readByte();
m_ugcPlayersVersion = dis->readInt();
m_dwPlayerCount = dis->readByte();
+ if( m_dwPlayerCount > MINECRAFT_NET_MAX_PLAYERS ) m_dwPlayerCount = MINECRAFT_NET_MAX_PLAYERS;
if( m_dwPlayerCount > 0 )
{
m_playerXuids = new PlayerUID[m_dwPlayerCount];
@@ -74,6 +75,7 @@ void PreLoginPacket::read(DataInputStream *dis) //throws IOException
{
m_szUniqueSaveName[i]=dis->readByte();
}
+ // m_szUniqueSaveName[m_iSaveNameLen - 1] = 0; // LCEMP does this but I have no idea why, TODO: why?
m_serverSettings = dis->readInt();
m_hostIndex = dis->readByte();