diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-06-02 20:38:55 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-06-02 20:38:55 +0000 |
commit | f96acb3407597642d4ce0ca828c8e39db128e10f (patch) | |
tree | e1815672305ef96a987ee12e238e2217c4875a4d | |
parent | 1c8f9a8109208fa0a6626bb0d3575580c2aa31a8 (diff) | |
download | classpath-f96acb3407597642d4ce0ca828c8e39db128e10f.tar.gz |
Backport fix for PR35482.
2008-05-06 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR classpath/35482
* java/lang/String.java:
(toLowerCase()): Fix calculation of number
of characters to copy.
(toLowerCaseTurkish()): Likewise.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | java/lang/String.java | 4 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2008-05-06 Andrew John Hughes <gnu_andrew@member.fsf.org> + + PR classpath/35482 + * java/lang/String.java: + (toLowerCase()): Fix calculation of number + of characters to copy. + (toLowerCaseTurkish()): Likewise. + 2008-04-18 Mario Torre <neugens@aicas.com> PR classpath/35974 diff --git a/java/lang/String.java b/java/lang/String.java index 6b57a2c39..0b56accf7 100644 --- a/java/lang/String.java +++ b/java/lang/String.java @@ -1451,7 +1451,7 @@ public final class String // Now we perform the conversion. Fortunately, there are no multi-character // lowercase expansions in Unicode 3.0.0. char[] newStr = new char[count]; - VMSystem.arraycopy(value, offset, newStr, 0, count - (x - offset)); + VMSystem.arraycopy(value, offset, newStr, 0, x - offset); do { char ch = value[x]; @@ -1507,7 +1507,7 @@ public final class String // Now we perform the conversion. Fortunately, there are no // multi-character lowercase expansions in Unicode 3.0.0. char[] newStr = new char[count]; - VMSystem.arraycopy(value, offset, newStr, 0, count - (x - offset)); + VMSystem.arraycopy(value, offset, newStr, 0, x - offset); do { char ch = value[x]; |