summaryrefslogtreecommitdiff
path: root/project2/common/variableConvert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/common/variableConvert.cpp')
-rw-r--r--project2/common/variableConvert.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/project2/common/variableConvert.cpp b/project2/common/variableConvert.cpp
index 6237c26..d0363f5 100644
--- a/project2/common/variableConvert.cpp
+++ b/project2/common/variableConvert.cpp
@@ -151,8 +151,8 @@ class ConvertVisitorBool : public boost::static_visitor<bool> {
private:
static bool fromStr(const Glib::ustring & s) {
const char * str = s.c_str();
- if (strcasecmp(str, "true") == 0 || strcasecmp(str, "yes") == 0 || strcasecmp(str, "on") == 0) return true;
- if (strcasecmp(str, "false") == 0 || strcasecmp(str, "no") == 0 || strcasecmp(str, "off") == 0) return false;
+ if (strcasecmp(str, "true") == 0 || strcasecmp(str, "yes") == 0 || strcasecmp(str, "on") == 0 || strcasecmp(str, "1") == 0) return true;
+ if (strcasecmp(str, "false") == 0 || strcasecmp(str, "no") == 0 || strcasecmp(str, "off") == 0 || strcasecmp(str, "0") == 0) return false;
throw InvalidConversionTo("bool", s);
}
const VariableType * var;