diff --git a/parameterManager.cpp b/parameterManager.cpp index 05aaab7..f1a77fb 100644 --- a/parameterManager.cpp +++ b/parameterManager.cpp @@ -939,12 +939,16 @@ bool nothingExists(std::string path) bool isNumber(std::string number) { - for (size_t i = 0; i < number.length(); ++i) { + bool hasRemovedZero = false; + for (size_t i = 0; i < number.length(); ++i) if( number[i] == '0') { number.erase(i, 1); i--; + hasRemovedZero=true; } - } + if(hasRemovedZero && number == "") + number="0"; + return (std::to_string(atoll(number.c_str())) == number) ? true : false; }