heh, oops

This commit is contained in:
darkrose 2015-12-18 18:18:34 +10:00
parent e3ebd8c055
commit f2a6a09e3c
1 changed files with 17 additions and 13 deletions

View File

@ -676,26 +676,30 @@ public:
virtual bool parseConfigLine(const std::string &line)
{
JMutexAutoLock lock(m_mutex);
std::string name;
std::string value;
{
JMutexAutoLock lock(m_mutex);
std::string trimmedline = trim(line);
std::string trimmedline = trim(line);
// Ignore comments
if (trimmedline[0] == '#')
return true;
// Ignore comments
if (trimmedline[0] == '#')
return true;
Strfnd sf(trim(line));
Strfnd sf(trimmedline);
std::string name = sf.next("=");
name = trim(name);
name = sf.next("=");
name = trim(name);
if (name == "")
return true;
if (name == "")
return true;
std::string value = sf.next("\n");
value = trim(value);
value = sf.next("\n");
value = trim(value);
m_settings[name] = value;
m_settings[name] = value;
}
if (name == "game_mode")
setGameDefaults(value);