From b6ed8189d69a9d9d3e6496d8899d97c2e548553a Mon Sep 17 00:00:00 2001 From: dimitr Date: Fri, 22 Nov 2002 09:02:47 +0000 Subject: [PATCH] Applied patch for config_file.cpp. Thanks to Pirtea Calin Iancu. --- src/common/config/config_file.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/config/config_file.cpp b/src/common/config/config_file.cpp index 6475a7f071..a3676ddf28 100644 --- a/src/common/config/config_file.cpp +++ b/src/common/config/config_file.cpp @@ -169,7 +169,7 @@ string ConfigFile::getString(const string& key) string ConfigFile::parseKeyFrom(const string& inputLine, string::size_type& endPos) { - endPos = inputLine.find_first_of("= \t"); + endPos = inputLine.find_first_of("=\t"); if (endPos == string::npos) { return inputLine; @@ -257,6 +257,7 @@ void ConfigFile::loadConfig() string::size_type endPos; string key = parseKeyFrom(inputLine, endPos); + stripTrailingWhiteSpace(key); string value = parseValueFrom(inputLine, endPos); // std::cout << "adding \"" << key << "\" \"" << value << "\"" << std::endl;