Skip to content

Commit 03fc11e

Browse files
committed
Fix byte cast
1 parent 0017ca6 commit 03fc11e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

STUN/Proxy/Socks5UdpProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private static byte[] GetEndPointByte(IPEndPoint ep)
239239
{
240240
var ipByte = ep.Address.GetAddressBytes();
241241
var ret = new byte[ipByte.Length + 3];
242-
ret[0] = ipByte.Length == 4 ? 1 : 4;
242+
ret[0] = ipByte.Length == 4 ? (byte)1 : (byte)4;
243243
Array.Copy(ipByte, 0, ret, 1, ipByte.Length);
244244
ret[ipByte.Length + 1] = (byte)(ep.Port / 256);
245245
ret[ipByte.Length + 2] = (byte)(ep.Port % 256);

0 commit comments

Comments
 (0)