From 80b90159390b55dfc698a31da6a8e1fb59d51eee Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Thu, 10 Jan 2019 18:54:10 +0100 Subject: 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. --- src/settings.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.3