[armedbear-cvs] r13088 - trunk/abcl/src/org/armedbear/lisp/util

Mark Evenson mevenson at common-lisp.net
Sun Dec 5 07:50:48 UTC 2010


Author: mevenson
Date: Sun Dec  5 02:50:47 2010
New Revision: 13088

Log:
Fix algorithim error in writing byte sequences via RandomAccessCharacterFile.

Found and fixed by David Kirkman.

Modified:
   trunk/abcl/src/org/armedbear/lisp/util/RandomAccessCharacterFile.java

Modified: trunk/abcl/src/org/armedbear/lisp/util/RandomAccessCharacterFile.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/util/RandomAccessCharacterFile.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/util/RandomAccessCharacterFile.java	Sun Dec  5 02:50:47 2010
@@ -547,7 +547,7 @@
     final void write(byte[] b, int off, int len) throws IOException {
         int pos = off;
         while (pos < off + len) {
-            int want = len;
+            int want = len - pos + off;
             if (want > bbuf.remaining()) {
                 want = bbuf.remaining();
             }




More information about the armedbear-cvs mailing list