Author: krasnov
Date: 2007-05-14 09:56:17 -0400 (Mon, 14 May 2007)
New Revision: 77348
Modified:
branches/mainsoft/gh20/mcs/class/System.Web/System.Web/HttpWriter.cs
Log:
merge -r77346:77347
Modified: branches/mainsoft/gh20/mcs/class/System.Web/System.Web/HttpWriter.cs
===================================================================
--- branches/mainsoft/gh20/mcs/class/System.Web/System.Web/HttpWriter.cs
2007-05-14 13:51:06 UTC (rev 77347)
+++ branches/mainsoft/gh20/mcs/class/System.Web/System.Web/HttpWriter.cs
2007-05-14 13:56:17 UTC (rev 77348)
@@ -145,14 +145,7 @@
if (index < 0 || count < 0 || ((index + count >
s.Length)))
throw new ArgumentOutOfRangeException ();
- int length;
- if (index == 0 && count == s.Length) {
- length = encoding.GetMaxByteCount (s.Length);
- } else {
- char [] chars = s.ToCharArray (index, count);
- length = encoding.GetMaxByteCount
(chars.Length);
- }
-
+ int length = encoding.GetMaxByteCount (count);
byte [] bytebuffer = GetByteBuffer (length);
int realLength = encoding.GetBytes (s, index, count,
bytebuffer, 0);
output_stream.Write (bytebuffer, 0, realLength);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches