Author: alanmc
Date: 2006-10-12 13:21:49 -0400 (Thu, 12 Oct 2006)
New Revision: 66617

Modified:
   trunk/bitsharp/src/MonoTorrent.Client/Managers/FileManager.cs
Log:
bugfix: Now doesn't crash when hashchecking large torrents - Downloading of 
large torrents needs to be tested though

Modified: trunk/bitsharp/src/MonoTorrent.Client/Managers/FileManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/Managers/FileManager.cs       
2006-10-12 17:21:41 UTC (rev 66616)
+++ trunk/bitsharp/src/MonoTorrent.Client/Managers/FileManager.cs       
2006-10-12 17:21:49 UTC (rev 66617)
@@ -254,7 +254,7 @@
         {
             lock (this.hashBuffer)
             {
-                int pieceStartIndex = this.pieceLength * pieceIndex;
+                long pieceStartIndex = (long)this.pieceLength * pieceIndex;
                 int bytesRead = this.Read(this.hashBuffer, 0, pieceStartIndex, 
this.pieceLength);
                 return hasher.ComputeHash(this.hashBuffer, 0, bytesRead);
             }

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

Reply via email to