Răsfoiți Sursa

Fix byte cast

Bruce Wayne 4 ani în urmă
părinte
comite
03fc11e4d6
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      STUN/Proxy/Socks5UdpProxy.cs

+ 1 - 1
STUN/Proxy/Socks5UdpProxy.cs

@@ -239,7 +239,7 @@ namespace STUN.Proxy
 		{
 		{
 			var ipByte = ep.Address.GetAddressBytes();
 			var ipByte = ep.Address.GetAddressBytes();
 			var ret = new byte[ipByte.Length + 3];
 			var ret = new byte[ipByte.Length + 3];
-			ret[0] = ipByte.Length == 4 ? 1 : 4;
+			ret[0] = ipByte.Length == 4 ? (byte)1 : (byte)4;
 			Array.Copy(ipByte, 0, ret, 1, ipByte.Length);
 			Array.Copy(ipByte, 0, ret, 1, ipByte.Length);
 			ret[ipByte.Length + 1] = (byte)(ep.Port / 256);
 			ret[ipByte.Length + 1] = (byte)(ep.Port / 256);
 			ret[ipByte.Length + 2] = (byte)(ep.Port % 256);
 			ret[ipByte.Length + 2] = (byte)(ep.Port % 256);