Changeset 6744


Ignore:
Timestamp:
07/28/10 10:28:20 (9 years ago)
Author:
melissa
Message:

Force buffer reallocation if the previously allocated buffer is too small.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/ZeissLSMReader.java

    r6663 r6744  
    303303      int c = no % getSizeC(); 
    304304 
    305       if (prevPlane != plane || prevBuf == null) { 
     305      if (prevPlane != plane || prevBuf == null || 
     306        prevBuf.length < buf.length * getSizeC()) 
     307      { 
    306308        prevBuf = new byte[buf.length * getSizeC()]; 
    307309        tiffParser.getSamples(ifds.get(plane), prevBuf, x, y, w, h); 
  • trunk/components/bio-formats/src/loci/formats/in/ZeissLSMReader.java

    r6713 r6744  
    306306      int c = no % getSizeC(); 
    307307 
    308       if (prevPlane != plane || prevBuf == null) { 
     308      if (prevPlane != plane || prevBuf == null || 
     309        prevBuf.length < buf.length * getSizeC()) 
     310      { 
    309311        prevBuf = new byte[buf.length * getSizeC()]; 
    310312        tiffParser.getSamples(ifds.get(plane), prevBuf, x, y, w, h); 
Note: See TracChangeset for help on using the changeset viewer.