git repos / blockattack-game

commit 3220af76

sago007 · 2017-04-01 18:27
3220af76b5f7daf1ee95acf9565ce6f4f95ccf44 patch · browse files
parent 89faf4e50cf38f86c4d1f86c12745d89225bca42

Hotfix for Issue #14

Changed files

M source/code/common.cpp before
diff --git a/source/code/common.cpp b/source/code/common.cpp index e4cf830..882aae6 100644 --- a/source/code/common.cpp +++ b/source/code/common.cpp
@@ -49,7 +49,7 @@ double str2double(const string& str2parse) {
try {
return std::stod(str2parse);
}
- catch (std::ios_base::failure& f) {
+ catch (...) {
return 0.0;
}
}
@@ -78,7 +78,7 @@ int str2int(const string& str2parse) {
try {
return std::stoi(str2parse);
}
- catch (std::ios_base::failure& f) {
+ catch (...) {
return 0;
}
}