OSDN Git Service

2007-01-29 Kaloian Doganov <kaloian@doganov.org>
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jan 2007 02:46:54 +0000 (02:46 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jan 2007 02:46:54 +0000 (02:46 +0000)
PR libgcj/30600:
* gnu/gcj/convert/BytesToCharsetAdaptor.java (read): Fix call to
'limit'.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121329 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/classpath/lib/gnu/gcj/convert/BytesToCharsetAdaptor.class
libjava/gnu/gcj/convert/BytesToCharsetAdaptor.java

index 037b1bb..023e31a 100644 (file)
@@ -1,3 +1,9 @@
+2007-01-29  Kaloian Doganov  <kaloian@doganov.org>
+
+       PR libgcj/30600:
+       * gnu/gcj/convert/BytesToCharsetAdaptor.java (read): Fix call to
+       'limit'.
+
 2007-01-29  Kyle Galloway  <kgallowa@redhat.com>
 
        * include/java-interp.h:  Added _Jv_Frame class and its two
 2007-01-29  Kyle Galloway  <kgallowa@redhat.com>
 
        * include/java-interp.h:  Added _Jv_Frame class and its two
index 7efd0fe..bf4e201 100644 (file)
Binary files a/libjava/classpath/lib/gnu/gcj/convert/BytesToCharsetAdaptor.class and b/libjava/classpath/lib/gnu/gcj/convert/BytesToCharsetAdaptor.class differ
index 78ba848..4b43d7b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005  Free Software Foundation
+/* Copyright (C) 2005, 2007  Free Software Foundation
 
 This file is part of libgcj.
 
 
 This file is part of libgcj.
 
@@ -71,7 +71,7 @@ public class BytesToCharsetAdaptor extends BytesToUnicode
   {
     if (inBuf == null || ! inBuf.hasArray() || inBuf.array() != inbuffer)
       inBuf = ByteBuffer.wrap(inbuffer);
   {
     if (inBuf == null || ! inBuf.hasArray() || inBuf.array() != inbuffer)
       inBuf = ByteBuffer.wrap(inbuffer);
-    inBuf.limit(inpos + inlength);
+    inBuf.limit(inlength);
     inBuf.position(inpos);
 
     CharBuffer outBuf = CharBuffer.wrap(outbuffer, outpos, count);
     inBuf.position(inpos);
 
     CharBuffer outBuf = CharBuffer.wrap(outbuffer, outpos, count);