mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 03:18:57 +08:00
natString.cc (getBytes): Correctly size result buffer.
* java/lang/natString.cc (getBytes): Correctly size result buffer. From Bryce McKinlay <bryce@albatross.co.nz>. From-SVN: r26575
This commit is contained in:
parent
11bbe619e3
commit
47e2610954
@ -1,3 +1,8 @@
|
||||
1999-04-21 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* java/lang/natString.cc (getBytes): Correctly size result
|
||||
buffer. From Bryce McKinlay <bryce@albatross.co.nz>.
|
||||
|
||||
1999-04-20 Andrew Haley <aph@cygnus.com>
|
||||
|
||||
* include/sparc-signal.h: new file.
|
||||
|
@ -487,8 +487,8 @@ java::lang::String::getBytes (jstring enc)
|
||||
}
|
||||
if (bufpos == buflen)
|
||||
return buffer;
|
||||
jbyteArray result = JvNewByteArray(bufpos);
|
||||
memcpy (elements (result), elements (buffer), bufpos);
|
||||
jbyteArray result = JvNewByteArray(buflen);
|
||||
memcpy (elements (result), elements (buffer), buflen);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user