Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2005-07-01 03:22:00 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2005-07-01 03:22:00 +0400
commit6117e7c88a9b05a9c4affff5f4577969e517fd26 (patch)
tree8ed27bcf6f534b0ba49fa83bda1c8fa0542d86b1 /mcs
parent5af44bea687325d1d90c8fa0c26942ce0de1a9c9 (diff)
from head
svn path=/branches/mono-1-1-8/mcs/; revision=46811
Diffstat (limited to 'mcs')
-rwxr-xr-xmcs/class/corlib/System.Text/ChangeLog6
-rw-r--r--mcs/class/corlib/System.Text/StringBuilder.cs3
2 files changed, 9 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.Text/ChangeLog b/mcs/class/corlib/System.Text/ChangeLog
index 6a93f6fc034..5b792c2c08f 100755
--- a/mcs/class/corlib/System.Text/ChangeLog
+++ b/mcs/class/corlib/System.Text/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-21 Ben Maurer <bmaurer@ximian.com>
+
+ * StringBuilder.cs (Replace): Do the correct thing when we replace
+ with a longer string. Thanks to Alexander Beznozdrev
+ <abeznozdrev@croc.ru>
+
2005-05-26 Ben Maurer <bmaurer@ximian.com>
* Encoding.cs: Use static object for locking. `volatile' to
diff --git a/mcs/class/corlib/System.Text/StringBuilder.cs b/mcs/class/corlib/System.Text/StringBuilder.cs
index 8be44d6e0e4..d0d36dd7ac9 100644
--- a/mcs/class/corlib/System.Text/StringBuilder.cs
+++ b/mcs/class/corlib/System.Text/StringBuilder.cs
@@ -296,7 +296,10 @@ namespace System.Text {
InternalEnsureCapacity (replace.Length + (_length - count));
+ string end = _str.Substring (startIndex + count, _length - startIndex - count );
+
String.InternalStrcpy (_str, startIndex, replace);
+ String.InternalStrcpy (_str, startIndex + replace.Length, end);
_length = replace.Length + (_length - count);