diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2000-05-10 11:13:17 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2000-05-10 12:13:17 +0100 |
commit | ac83e16bc4a3a58c821a6f74e27fd9dc95149919 (patch) | |
tree | 48c22aeeb252504fa67252021860ffd3bc9192e3 /libjava | |
parent | ede1dbac052d2aa119fe519ef57d8afec897cb40 (diff) | |
download | gcc-ac83e16bc4a3a58c821a6f74e27fd9dc95149919.zip gcc-ac83e16bc4a3a58c821a6f74e27fd9dc95149919.tar.gz gcc-ac83e16bc4a3a58c821a6f74e27fd9dc95149919.tar.bz2 |
StringBuffer.java (replace): Calculate length for arraycopy() correctly.
2000-05-10 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/StringBuffer.java (replace): Calculate length for
arraycopy() correctly.
From-SVN: r33822
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 2 | ||||
-rw-r--r-- | libjava/java/lang/StringBuffer.java | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index dd8abaa..00330e0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -6,6 +6,8 @@ (replace): Reimplemented. Fix javadoc. (reverse): Call ensureCapacity_unsynchronized(). (StringBuffer (String)): Use DEFAULT_CAPACITY. + + (replace): Calculate length for arraycopy() correctly. 2000-05-09 Tom Tromey <tromey@cygnus.com> diff --git a/libjava/java/lang/StringBuffer.java b/libjava/java/lang/StringBuffer.java index ed0e84c..cf82540 100644 --- a/libjava/java/lang/StringBuffer.java +++ b/libjava/java/lang/StringBuffer.java @@ -519,7 +519,7 @@ public final class StringBuffer implements Serializable ensureCapacity_unsynchronized (count + delta); if (delta != 0 && end < count) - System.arraycopy(value, end, value, end + delta, count - start); + System.arraycopy(value, end, value, end + delta, count - end); str.getChars (0, len, value, start); count += delta; |