aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2019-01-10 18:54:10 +0100
committerparamat <mat.gregory@virginmedia.com>2019-01-19 18:31:41 +0000
commit80b90159390b55dfc698a31da6a8e1fb59d51eee (patch)
tree96acda72ba78f10ac3003080747446cba9bc7228
parent11b550e0245d8ce4e171d9cda5c6578143a59869 (diff)
downloadminetest-80b90159390b55dfc698a31da6a8e1fb59d51eee.tar.gz
minetest-80b90159390b55dfc698a31da6a8e1fb59d51eee.tar.bz2
minetest-80b90159390b55dfc698a31da6a8e1fb59d51eee.zip
Advanced settings noiseparams: Remove '}' left in .conf
Previously, when editing noiseparams then restoring them to the default, the final '}' was not removed from minetest.conf.
-rw-r--r--src/settings.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 4dd72a4f4..66c17e12d 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -249,6 +249,9 @@ bool Settings::updateConfigObject(std::istream &is, std::ostream &os,
} else if (it == m_settings.end()) {
// Remove by skipping
was_modified = true;
+ Settings removed_group; // Move 'is' to group end
+ std::stringstream ss;
+ removed_group.updateConfigObject(is, ss, "}", tab_depth + 1);
break;
} else {
printEntry(os, name, it->second, tab_depth);