Changeset 28699

Show
Ignore:
Timestamp:
26.11.2013 16:06:16 (6 years ago)
Author:
ak19
Message:

Jeremy (jts21) has fixed a bug in search4j. In the past the -m flag to set the minimum Java version needed to be of the form 1.8.0_0 and could not accept 1.8.0 and would crash. Now the java minor and update version numbers are optional.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/search4j/libsearch4j.cpp

    r22529 r28699  
    177177    era_ = atoi( version.substr(0,1).c_str() ); 
    178178    major_ = atoi( version.substr(2,1).c_str() ); 
    179     minor_ = atoi( version.substr(4,1).c_str() ); 
    180     update_ = atoi( version.substr(6,2).c_str() ); 
     179    if(version.length() >= 5) { 
     180      minor_ = atoi( version.substr(4,1).c_str() ); 
     181    } else { 
     182      minor_ = 0; 
     183    } 
     184    if(version.length() >= 7) { 
     185      update_ = atoi( version.substr(6,2).c_str() ); 
     186    } else { 
     187      update_ = 0; 
     188    } 
    181189    return true; 
    182190}