summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Utilities.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Utilities.cpp b/src/Utilities.cpp
index dc654ea..b14b444 100644
--- a/src/Utilities.cpp
+++ b/src/Utilities.cpp
@@ -93,6 +93,8 @@ std::vector<T> stringToNumericVector(const std::string &s)
iss.clear();
T f;
iss >> f;
+ if (iss.fail() || !iss.eof())
+ throw bad_cast();
out.push_back(f);
current = next + 1;
} while (next != std::string::npos && current != length);