Author: gregorb
Date: 2006-10-27 10:17:37 -0400 (Fri, 27 Oct 2006)
New Revision: 67026

Modified:
   trunk/bitsharp/src/MonoTorrent.Tracker/Peer.cs
Log:
fixed wrong cast bug reported by 
?\208?\165?\208?\188?\209?\139?\208?\183?\208?\181?\208?\189?\208?\186?\208?\190
 ?\208?\146?\208?\184?\208?\186?\209?\130?\208?\190?\209?\128 <[EMAIL 
PROTECTED]>

Modified: trunk/bitsharp/src/MonoTorrent.Tracker/Peer.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Tracker/Peer.cs      2006-10-27 13:14:25 UTC 
(rev 67025)
+++ trunk/bitsharp/src/MonoTorrent.Tracker/Peer.cs      2006-10-27 14:17:37 UTC 
(rev 67026)
@@ -136,7 +136,7 @@
             if (sport == 0)
                 throw new ArgumentException("sport");
                             
-            byte[] port = 
BitConverter.GetBytes(IPAddress.HostToNetworkOrder((short)sport));
+            byte[] port = 
BitConverter.GetBytes(IPAddress.HostToNetworkOrder((ushort)sport));
             byte[] addr = 
BitConverter.GetBytes((int)IPAddress.Parse(address).Address);
             byte[] entry = new byte[addr.Length + port.Length];
             

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to