Commit 0cbf1a288b1c7eca705f1159c8e5d794daba9b43

Authored by Jürgen Knödlseder
1 parent 4496dec9

Correct maximum value detection in GApplication::check_value_int() and GApplicat…

…ion::check_value_real() methods.
Showing 1 changed file with 2 additions and 4 deletions
src/app/GApplicationPar.cpp
... ... @@ -982,7 +982,7 @@ void GApplicationPar::check_value_int(const std::string& value) const
982 982  
983 983 // If no options check has been done and if there is a m_min and
984 984 // m_max value then perform an integer check
985   - if (!has_options && m_min.length() > 0 && m_max.length()) {
  985 + if (!has_options && m_min.length() > 0 && m_max.length() > 0) {
986 986  
987 987 // Throw an exception if we have a NAN parameter
988 988 if (m_status == ST_NAN) {
... ... @@ -1038,7 +1038,7 @@ void GApplicationPar::check_value_real(const std::string& value) const
1038 1038  
1039 1039 // If no options check has been done and if there is a m_min and
1040 1040 // m_max value then perform an integer check
1041   - if (!has_options && m_min.length() > 0 && m_max.length()) {
  1041 + if (!has_options && m_min.length() > 0 && m_max.length() > 0) {
1042 1042  
1043 1043 // Throw an exception if we have a NAN parameter
1044 1044 if (m_status == ST_NAN) {
... ... @@ -1084,7 +1084,6 @@ void GApplicationPar::check_value_real(const std::string& value) const
1084 1084 void GApplicationPar::check_value_string(const std::string& value) const
1085 1085 {
1086 1086 // Check for options
1087   - //bool has_options = check_options(value);
1088 1087 check_options(value);
1089 1088  
1090 1089 // Return
... ... @@ -1108,7 +1107,6 @@ void GApplicationPar::check_value_string(const std::string& value) const
1108 1107 void GApplicationPar::check_value_filename(const std::string& value) const
1109 1108 {
1110 1109 // Check for options
1111   - //bool has_options = check_options(value);
1112 1110 check_options(value);
1113 1111  
1114 1112 // Return
... ...