From 5456a6e969f99a46846e7767ac56d2c07b46f5a3 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Mon, 20 Jun 2016 15:18:27 -0700 Subject: [PATCH] Stop attempting to read the reduced debug info value in 1.7 Fixes #165. Reduced debug info was added in 1.8, and isn't found in 1.7. Since it isn't there in 1.7, the client would crash when it attempts to read it on the join game packet. --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 2dea6791..3da93753 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -250,7 +250,8 @@ namespace MinecraftClient.Protocol.Handlers readNextByte(packetData); readNextByte(packetData); readNextString(packetData); - readNextBool(packetData); + if (protocolversion >= MC18Version) + readNextBool(packetData); // Reduced debug info - 1.8 and above break; case PacketIncomingType.ChatMessage: string message = readNextString(packetData);