Fixed ini class

This commit is contained in:
Edoardo Lolletti 2019-02-17 20:28:08 +01:00 committed by GitHub
parent 7a0dc2ef4b
commit 13a57542e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,13 +85,13 @@ void IniFile::SetValue(const std::string& field, const std::string& key, const s
}
std::string IniFile::GetValueString(const std::string & field, const std::string & key, const std::string & _default) {
if(contents.find(key) != contents.end())
if(contents.find(field) != contents.end())
return contents[field].GetValString(key);
return _default;
}
int IniFile::GetValueInt(const std::string & field, const std::string & key, int _default) {
if(contents.find(key) != contents.end())
if(contents.find(field) != contents.end())
return contents[field].GetValInt(key);
return _default;
}