diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 18:55:16 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 20:59:46 +0100 |
commit | e51a1390359e45f20022078e117a8e52daeab814 (patch) | |
tree | eb12541d4d96bb750e8ef04ed15a17151fdbaded /src/IniFile.cpp | |
parent | Merge pull request #2960 from LogicParrot/interspecies (diff) | |
download | cuberite-e51a1390359e45f20022078e117a8e52daeab814.tar cuberite-e51a1390359e45f20022078e117a8e52daeab814.tar.gz cuberite-e51a1390359e45f20022078e117a8e52daeab814.tar.bz2 cuberite-e51a1390359e45f20022078e117a8e52daeab814.tar.lz cuberite-e51a1390359e45f20022078e117a8e52daeab814.tar.xz cuberite-e51a1390359e45f20022078e117a8e52daeab814.tar.zst cuberite-e51a1390359e45f20022078e117a8e52daeab814.zip |
Diffstat (limited to '')
-rw-r--r-- | src/IniFile.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/IniFile.cpp b/src/IniFile.cpp index 2efa9064b..4a1c8e735 100644 --- a/src/IniFile.cpp +++ b/src/IniFile.cpp @@ -146,7 +146,7 @@ bool cIniFile::ReadFile(const AString & a_FileName, bool a_AllowExampleRedirect) case '=': { valuename = line.substr(0, pLeft); - value = line.substr(pLeft + 1); + value = TrimString(line.substr(pLeft + 1)); AddValue(keyname, valuename, value); break; } @@ -213,13 +213,13 @@ bool cIniFile::WriteFile(const AString & a_FileName) const for (size_t keyID = 0; keyID < keys.size(); ++keyID) { f << '[' << names[keyID] << ']' << iniEOL; - + // Comments. for (size_t commentID = 0; commentID < keys[keyID].comments.size(); ++commentID) { f << ';' << keys[keyID].comments[commentID] << iniEOL; } - + // Values. for (size_t valueID = 0; valueID < keys[keyID].names.size(); ++valueID) { @@ -662,7 +662,7 @@ bool cIniFile::HasValue(const AString & a_KeyName, const AString & a_ValueName) { return false; } - + // Find the value: int valueID = FindValue(keyID, a_ValueName); return (valueID != noID); |