[armedbear-cvs] r13707 - trunk/abcl/src/org/armedbear/lisp

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Dec 20 22:00:27 UTC 2011


Author: ehuelsmann
Date: Tue Dec 20 14:00:26 2011
New Revision: 13707

Log:
Fix #182: ADJUST-ARRAY failure.

Modified:
   trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java

Modified: trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java	Tue Dec 20 13:52:14 2011	(r13706)
+++ trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java	Tue Dec 20 14:00:26 2011	(r13707)
@@ -287,12 +287,13 @@
       }
     if (capacity != newCapacity)
       {
-        LispObject[] newElements = new LispObject[newCapacity];
+        byte[] newElements = new byte[newCapacity];
         System.arraycopy(elements, 0, newElements, 0,
                          Math.min(capacity, newCapacity));
+        byte initValue = (byte)(initialElement.intValue() & 0xFF);
         if (initialElement != null)
             for (int i = capacity; i < newCapacity; i++)
-                newElements[i] = initialElement;
+                newElements[i] = initValue;
         return new BasicVector_UnsignedByte8(newElements);
       }
     // No change.




More information about the armedbear-cvs mailing list