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) 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 // Ignore comments
if (trimmedline[0] == '#') if (trimmedline[0] == '#')
return true; return true;
Strfnd sf(trim(line)); Strfnd sf(trimmedline);
std::string name = sf.next("="); name = sf.next("=");
name = trim(name); name = trim(name);
if (name == "") if (name == "")
return true; return true;
std::string value = sf.next("\n"); value = sf.next("\n");
value = trim(value); value = trim(value);
m_settings[name] = value; m_settings[name] = value;
}
if (name == "game_mode") if (name == "game_mode")
setGameDefaults(value); setGameDefaults(value);