Changeset 12584


Ignore:
Timestamp:
04/08/10 21:49:56 (11 years ago)
Author:
ehuelsmann
Message:

Re #92: Don't return characters for the range #xD800 to #xDFFF.

This doesn't fix the character(s) over #xFFFF though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/LispCharacter.java

    r12581 r12584  
    348348      public LispObject execute(LispObject arg)
    349349      {
    350           int n = Fixnum.getValue(arg);
    351           if (n < CHAR_MAX)
    352             return lispChars.get((char)n);
    353           else if (n <= Character.MAX_VALUE)
    354             return new LispCharacter((char)n);
    355               // SBCL signals a type-error here: "not of type (UNSIGNED-BYTE 8)"
     350        int n = Fixnum.getValue(arg);
     351        if (Character.isValidCodePoint(n)
     352          return LispCharacter.getInstance((char)n);
    356353        return NIL;
    357354      }
Note: See TracChangeset for help on using the changeset viewer.