Changeset 13178


Ignore:
Timestamp:
01/22/11 22:55:38 (11 years ago)
Author:
ehuelsmann
Message:

Fix problem found by Blake McBride? while running SCONE.

Note: the problem was that SCONE tries to bind a symbol
named 1s2f, which was interpreted as a number by ABCL.

File:
1 edited

Legend:

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

    r12810 r13178  
    13301330    private static final LispObject makeFloat(final String token,
    13311331            final int length)
    1332 
    13331332    {
    13341333        if (length == 0)
     
    13781377        // Append rest of token.
    13791378        sb.append(token.substring(i));
     1379        c = sb.charAt(sb.length()-1);
     1380        if (! ('0' <= c && c <= '9'))
     1381            // we need to check that the last item is a number:
     1382            // the Double.parseDouble routine accepts numbers ending in 'D'
     1383            // like 1e2d. The same is true for Float.parseFloat and the 'F'
     1384            // character. However, these are not valid Lisp floats.
     1385            return null;
    13801386        try {
    13811387            if (marker == 0) {
Note: See TracChangeset for help on using the changeset viewer.