Changeset 4034


Ignore:
Timestamp:
05/12/08 08:06:01 (12 years ago)
Author:
melissa
Message:

Corrected event count calculation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/ZeissLSMReader.java

    r4032 r4034  
    405405        in.seek(eventListOffset + 4); 
    406406        int numEvents = in.readInt(); 
     407        in.seek(in.getFilePointer() - 4); 
     408        in.order(!in.isLittleEndian()); 
     409        int tmpEvents = in.readInt(); 
     410        if (numEvents < 0) numEvents = tmpEvents; 
     411        else numEvents = (int) Math.min(numEvents, tmpEvents); 
     412        in.order(!in.isLittleEndian()); 
     413 
    407414        for (int i=0; i<numEvents; i++) { 
    408415          if (in.getFilePointer() + 16 <= in.length()) { 
Note: See TracChangeset for help on using the changeset viewer.