Преглед на файлове

2003-07-10 Gonzalo Paniagua Javier <[email protected]>

	* MemoryStream.cs: fixed bug #46060. Thanks to Carlos Barcenilla.

svn path=/trunk/mcs/; revision=16079
Gonzalo Paniagua Javier преди 22 години
родител
ревизия
f44145d60e
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 4 0
      mcs/class/corlib/System.IO/ChangeLog
  2. 1 1
      mcs/class/corlib/System.IO/MemoryStream.cs

+ 4 - 0
mcs/class/corlib/System.IO/ChangeLog

@@ -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

+ 1 - 1
mcs/class/corlib/System.IO/MemoryStream.cs

@@ -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)