Changeset 11427


Ignore:
Timestamp:
12/06/08 18:45:06 (12 years ago)
Author:
ehuelsmann
Message:

Fix STRING-INPUT-STREAM GET-OFFSET with non-zero :start offset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/open-external-format/src/org/armedbear/lisp/StringInputStream.java

    r11426 r11427  
    3939{
    4040    private final StringReader stringReader;
     41    private final int start;
    4142   
    4243    public StringInputStream(String s)
     
    5758        eolStyle = EolStyle.LF;
    5859
     60        this.start = start;
     61       
    5962        stringReader = new StringReader(s.substring(start, end));
    6063        initAsCharacterInputStream(stringReader);
     
    9396    }
    9497
     98    @Override
     99    public int getOffset() {
     100        return start + super.getOffset();
     101    }
     102   
    95103    // ### make-string-input-stream
    96104    // make-string-input-stream string &optional start end => string-stream
Note: See TracChangeset for help on using the changeset viewer.