Author: alanmc
Date: 2007-03-31 12:46:15 -0500 (Sat, 31 Mar 2007)
New Revision: 75243

Modified:
   trunk/bitsharp/src/MonoTorrent.Client/Managers/BufferManager.cs
Log:
BugFix for buffer manager. I should've been using '<=' not '<'

Modified: trunk/bitsharp/src/MonoTorrent.Client/Managers/BufferManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/Managers/BufferManager.cs     
2007-03-31 16:40:05 UTC (rev 75242)
+++ trunk/bitsharp/src/MonoTorrent.Client/Managers/BufferManager.cs     
2007-03-31 17:46:15 UTC (rev 75243)
@@ -123,13 +123,13 @@
         /// <param name="type">The type of buffer that is needed</param>
         public void GetBuffer(ref byte[] buffer, int minCapacity)
         {
-            if (minCapacity < SmallMessageBufferSize)
+            if (minCapacity <= SmallMessageBufferSize)
                 GetBuffer(ref buffer, BufferType.SmallMessageBuffer);
 
-            else if (minCapacity < MediumMessageBufferSize)
+            else if (minCapacity <= MediumMessageBufferSize)
                 GetBuffer(ref buffer, BufferType.MediumMessageBuffer);
 
-            else if (minCapacity < LargeMessageBufferSize)
+            else if (minCapacity <= LargeMessageBufferSize)
                 GetBuffer(ref buffer, BufferType.LargeMessageBuffer);
 
             else

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

Reply via email to