* MemoryStream.cs: fixed bug #46060. Thanks to Carlos Barcenilla. svn path=/trunk/mcs/; revision=16079
@@ -1,3 +1,7 @@
+2003-07-10 Gonzalo Paniagua Javier <[email protected]>
+
+ * MemoryStream.cs: fixed bug #46060. Thanks to Carlos Barcenilla.
2003-06-30 Zoltan Varga <[email protected]>
* FileStream.cs (Dispose): Flush the buffer even if we don't own the
@@ -353,7 +353,7 @@ namespace System.IO
if (!canWrite)
throw new NotSupportedException ("Cannot write to this stream.");
- if (position + 1 >= capacity)
+ if (position >= capacity)
Capacity = CalculateNewCapacity (position + 1);
if (position >= length)