Skip to content
Snippets Groups Projects
Commit cc8d7b86 authored by Zeno-'s avatar Zeno- Committed by RealBadAngel
Browse files

Stop inserting empty lines at end of minetest.conf file each time it is rewritten

parent 1c21e391
Branches
Tags
No related merge requests found
......@@ -667,8 +667,9 @@ void Settings::getUpdatedConfigObject(std::istream &is,
bool &changed)
{
std::string name, value;
if (!parseConfigObject(is, name, value)) {
dst.push_back(value + '\n');
dst.push_back(value + (is.eof() ? "" : "\n"));
return;
}
......@@ -679,7 +680,7 @@ void Settings::getUpdatedConfigObject(std::istream &is,
changed = true;
}
dst.push_back(name + " = " + new_value + '\n');
dst.push_back(name + " = " + new_value + (is.eof() ? "" : "\n"));
updated.insert(name);
} else { // File contains a setting which is not in m_settings
changed = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment