diff options
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r-- | src/helpers/MiscFunctions.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 17e7a1a1..22afd4a0 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -174,6 +174,9 @@ bool isNumber(const std::string& str, bool allowfloat) { std::string copy = str; if (*copy.begin() == '-') copy = copy.substr(1); + + if (copy.empty()) + return false; bool point = !allowfloat; for (auto& c : copy) { |