-fixed codedump if no separator in string found

This commit is contained in:
fix94.1 2012-06-15 10:45:57 +00:00
parent 5457c30a83
commit 4dc425d650

View File

@ -340,6 +340,7 @@ vector<string> Config::getStrings(const string &domain, const string &key, char
retval.push_back(defVal);
return retval;
}
string &data = m_domains[upperCase(domain)][lowerCase(key)];
if(data.empty())
{
@ -355,6 +356,13 @@ vector<string> Config::getStrings(const string &domain, const string &key, char
// find first "non-delimiter".
string::size_type pos = data.find_first_of(seperator, lastPos);
// no seperator found, return data
if(pos == string::npos)
{
retval.push_back(data);
return retval;
}
while(string::npos != pos || string::npos != lastPos)
{
// found a token, add it to the vector.