Author: alanmc
Date: 2006-11-05 14:02:24 -0500 (Sun, 05 Nov 2006)
New Revision: 67389

Modified:
   trunk/bitsharp/src/MonoTorrent.Client/BitField.cs
Log:
BugFix: Wasn't correctly obeying startIndex and endIndex before

Modified: trunk/bitsharp/src/MonoTorrent.Client/BitField.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/BitField.cs   2006-11-05 18:54:10 UTC 
(rev 67388)
+++ trunk/bitsharp/src/MonoTorrent.Client/BitField.cs   2006-11-05 19:02:24 UTC 
(rev 67389)
@@ -323,7 +323,9 @@
 
                 start = i * 32;
                 end = start + 32;
+                start = (start < startIndex) ? startIndex : start;
                 end = (end > this.length) ? this.length : end;
+                end = (end > endIndex) ? endIndex : end;
 
                 for (int j = start; j < end; j++)
                     if (Get(j))     // This piece is true

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

Reply via email to