Changeset 5694


Ignore:
Timestamp:
11/16/09 12:20:26 (10 years ago)
Author:
melissa
Message:

Prevent StringIndexOutOfBoundsException when parsing Objective data. Closes #435.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/src/loci/formats/in/ZeissZVIReader.java

    r5686 r5694  
    921921          for (int q=0; q<tokens.length; q++) { 
    922922            int slash = tokens[q].indexOf("/"); 
    923             if (slash != -1) { 
     923            if (slash != -1 && slash - q > 0) { 
    924924              int mag = (int) 
    925925                Double.parseDouble(tokens[q].substring(0, slash - q)); 
  • trunk/components/bio-formats/src/loci/formats/in/ZeissZVIReader.java

    r5686 r5694  
    921921          for (int q=0; q<tokens.length; q++) { 
    922922            int slash = tokens[q].indexOf("/"); 
    923             if (slash != -1) { 
     923            if (slash != -1 && slash - q > 0) { 
    924924              int mag = (int) 
    925925                Double.parseDouble(tokens[q].substring(0, slash - q)); 
Note: See TracChangeset for help on using the changeset viewer.