Handle negative value in server ping (#1626)

This commit is contained in:
ORelio 2021-06-11 23:04:44 +02:00
parent 8bd221c248
commit 39b7d878dd
4 changed files with 3 additions and 13 deletions

View file

@ -1442,7 +1442,7 @@ namespace MinecraftClient.Protocol.Handlers
//Retrieve protocol version number for handling this server
if (versionData.Properties.ContainsKey("protocol"))
protocolversion = dataTypes.Atoi(versionData.Properties["protocol"].StringValue);
protocolversion = int.Parse(versionData.Properties["protocol"].StringValue);
// Check for forge on the server.
Protocol18Forge.ServerInfoCheckForge(jsonData, ref forgeInfo);