Changeset 11977


Ignore:
Timestamp:
06/01/09 15:30:30 (13 years ago)
Author:
ehuelsmann
Message:

Use a slighly less contrived calculation method to
calculate the buffer window to be written to disk.

File:
1 edited

Legend:

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

    r11976 r11977  
    436436        fcn.position(bbufpos);
    437437
    438         bbuf.position(0);
    439         if (bbufpos + bbuf.limit() > fcnsize) {
    440             // the buffer is at the end of the file.
    441             // area beyond fcnsize does not have data.
    442             bbuf.limit((int)(fcnsize - bbufpos));
    443         }
     438        // if the buffer is dirty, the modifications have to be
     439        // before position(): before re-positioning, this.position()
     440        // calls this function.
     441        bbuf.flip();
    444442        fcn.write(bbuf);
    445443
Note: See TracChangeset for help on using the changeset viewer.