[Fwd: JNI Bug report / C++ issues]

Johannes Deisenhofer joe at dillingen.baynet.de
Mon Nov 2 14:01:29 PST 1998


Hi,

I'm sorry, I have made a rather big mistake in the patch I supplied
last week.
Please apply this one on top of it:

diff -r -u kaffe-1.0.b2.org/libraries/javalib/java/lang/StringBuffer.java
kaffe-
1.0.b2/libraries/javalib/java/lang/StringBuffer.java
--- kaffe-1.0.b2.org/libraries/javalib/java/lang/StringBuffer.java
Mon Nov
 2 22:51:19 1998
+++ kaffe-1.0.b2/libraries/javalib/java/lang/StringBuffer.java  Thu Oct 29
22:18
:01 1998
@@ -227,14 +227,14 @@
        buffer = new char[newLength];

        if (newLength > used) {
-               System.arraycopy(oldBuffer, 0, buffer, 0, newLength);
+               System.arraycopy(oldBuffer, 0, buffer, 0, used);
                /* Pad buffer */
                for (int pos = used; pos < newLength; pos++) {
                        buffer[pos]='\u0000';
                }
        }
        else
-               System.arraycopy(oldBuffer, 0, buffer, 0, used);
+               System.arraycopy(oldBuffer, 0, buffer, 0, newLength);

        used = newLength;
 }


// Johannes Deisenhofer joe at dillingen.baynet.de jdeisenhofer at acm.org




More information about the kaffe mailing list