diff options
-rw-r--r-- | src/settings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 66c17e12d..876c63e7b 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -69,7 +69,9 @@ Settings & Settings::operator = (const Settings &other) bool Settings::checkNameValid(const std::string &name) { bool valid = name.find_first_of("=\"{}#") == std::string::npos; - if (valid) valid = trim(name) == name; + if (valid) + valid = std::find_if(name.begin(), name.end(), ::isspace) == name.end(); + if (!valid) { errorstream << "Invalid setting name \"" << name << "\"" << std::endl; |