From e8e87049a769c515f888de98fa6d363506fdf72e Mon Sep 17 00:00:00 2001 From: dogwatch Date: Thu, 18 Jul 2013 08:02:05 -0700 Subject: [PATCH] Update MinecraftCom.cs --- MinecraftClient/MinecraftCom.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MinecraftClient/MinecraftCom.cs b/MinecraftClient/MinecraftCom.cs index 9508f280..d52f2f3c 100644 --- a/MinecraftClient/MinecraftCom.cs +++ b/MinecraftClient/MinecraftCom.cs @@ -614,8 +614,7 @@ namespace MinecraftClient data[1] = protocolversion; //short len - byte[] sh = new byte[2]; - sh = BitConverter.GetBytes((short)username.Length); + byte[] sh = BitConverter.GetBytes((short)username.Length); Array.Reverse(sh); sh.CopyTo(data, 2); @@ -625,7 +624,6 @@ namespace MinecraftClient name.CopyTo(data, 4); //short len - sh = new byte[2]; sh = BitConverter.GetBytes((short)host.Length); Array.Reverse(sh); sh.CopyTo(data, 4 + (username.Length * 2)); @@ -636,7 +634,6 @@ namespace MinecraftClient bhost.CopyTo(data, 6 + (username.Length * 2)); //port - sh = new byte[4]; sh = BitConverter.GetBytes(port); Array.Reverse(sh); sh.CopyTo(data, 6 + (username.Length * 2) + (host.Length * 2));