Changeset 2532


Ignore:
Timestamp:
04/02/07 11:46:15 (13 years ago)
Author:
curtis
Message:

Fix bug in IFD string parsing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/TiffTools.java

    r2531 r2532  
    431431 
    432432        // convert character array to array of strings 
    433         String[] strings = count == 1 ? null : new String[nullCount]; 
     433        String[] strings = nullCount == 1 ? null : new String[nullCount]; 
    434434        String s = null; 
    435435        int c = 0, ndx = -1; 
     
    443443            s = new String(ascii, ndx + 1, j - ndx); 
    444444          } 
    445           if (count > 1) strings[c++] = s; 
    446         } 
    447         if (count == 1) value = strings[0]; 
    448         else value = s; 
     445          if (strings != null) strings[c++] = s; 
     446        } 
     447        value = strings == null ? (Object) s : strings; 
    449448      } 
    450449      else if (type == SHORT) { 
Note: See TracChangeset for help on using the changeset viewer.