diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/config.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/config.cpp b/common/config.cpp index 1649e23..f106304 100644 --- a/common/config.cpp +++ b/common/config.cpp @@ -50,8 +50,11 @@ void Config::load_conf(){ std::string config_line; std::getline(config_file, config_line); std::string id = config_line.substr(0, config_line.find("=") - 1); - std::string value = config_line.substr(config_line.find("=") + 2, config_line.length()-1); - config[id] = value; + //Skip empty lines + if (id != "") { + std::string value = config_line.substr(config_line.find("=") + 2, config_line.length()-1); + config[id] = value; + } } config_file.close(); |