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

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Dec 20 22:04:34 UTC 2011


Author: ehuelsmann
Date: Tue Dec 20 14:04:33 2011
New Revision: 13708

Log:
Follow-up to last commit: Fix #182.

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 14:00:26 2011	(r13707)
+++ trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java	Tue Dec 20 14:04:33 2011	(r13708)
@@ -290,10 +290,11 @@
         byte[] newElements = new byte[newCapacity];
         System.arraycopy(elements, 0, newElements, 0,
                          Math.min(capacity, newCapacity));
-        byte initValue = (byte)(initialElement.intValue() & 0xFF);
-        if (initialElement != null)
+        if (initialElement != null) {
+            byte initValue = (byte)(initialElement.intValue() & 0xFF);
             for (int i = capacity; i < newCapacity; i++)
                 newElements[i] = initValue;
+        }
         return new BasicVector_UnsignedByte8(newElements);
       }
     // No change.




More information about the armedbear-cvs mailing list