Commit 8ff62227 by Jeff Sturm Committed by Jeff Sturm

UnicodeToBytes.java (write): Write work buffer starting from zero offset.

	* gnu/gcj/convert/UnicodeToBytes.java (write): Write work buffer
	starting from zero offset.

From-SVN: r44997
parent ea0c0b6e
2001-08-17 Jeff Sturm <jsturm@one-point.com>
* gnu/gcj/convert/UnicodeToBytes.java (write): Write work buffer
starting from zero offset.
2001-08-17 Hans-J. Boehm <Hans_Boehm@hp.com> 2001-08-17 Hans-J. Boehm <Hans_Boehm@hp.com>
* boehm.cc: Include gc_local_alloc.h if appropriate. * boehm.cc: Include gc_local_alloc.h if appropriate.
......
...@@ -143,7 +143,7 @@ public abstract class UnicodeToBytes extends IOConverter ...@@ -143,7 +143,7 @@ public abstract class UnicodeToBytes extends IOConverter
work = new char[inlength]; work = new char[inlength];
int srcEnd = inpos + (inlength > work.length ? work.length : inlength); int srcEnd = inpos + (inlength > work.length ? work.length : inlength);
str.getChars(inpos, srcEnd, work, 0); str.getChars(inpos, srcEnd, work, 0);
return write(work, inpos, inlength); return write(work, 0, srcEnd - inpos);
} }
/** Indicate that the converter is resuable. /** Indicate that the converter is resuable.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment