8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 14:03:07 +01:00

Applied patch for config_file.cpp. Thanks to Pirtea Calin Iancu.

This commit is contained in:
dimitr 2002-11-22 09:02:47 +00:00
parent e9295be3fe
commit b6ed8189d6

View File

@ -169,7 +169,7 @@ string ConfigFile::getString(const string& key)
string ConfigFile::parseKeyFrom(const string& inputLine, string::size_type& endPos) 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) if (endPos == string::npos)
{ {
return inputLine; return inputLine;
@ -257,6 +257,7 @@ void ConfigFile::loadConfig()
string::size_type endPos; string::size_type endPos;
string key = parseKeyFrom(inputLine, endPos); string key = parseKeyFrom(inputLine, endPos);
stripTrailingWhiteSpace(key);
string value = parseValueFrom(inputLine, endPos); string value = parseValueFrom(inputLine, endPos);
// std::cout << "adding \"" << key << "\" \"" << value << "\"" << std::endl; // std::cout << "adding \"" << key << "\" \"" << value << "\"" << std::endl;