From: SmallJoker Date: Thu, 10 Jan 2019 17:54:10 +0000 (+0100) Subject: Advanced settings noiseparams: Remove '}' left in .conf X-Git-Tag: 5.0.0~74 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80b90159390b55dfc698a31da6a8e1fb59d51eee;p=oweals%2Fminetest.git 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. --- 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);