From c77f5da9eaefa4d5692fa42a015fbffe7140fa5d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 14 Jul 2019 15:07:13 -0700 Subject: [PATCH] Config: Don't save empty sections. --- ext/native/file/ini_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/native/file/ini_file.cpp b/ext/native/file/ini_file.cpp index cfefbb878e..99bdcd163a 100644 --- a/ext/native/file/ini_file.cpp +++ b/ext/native/file/ini_file.cpp @@ -597,7 +597,7 @@ bool IniFile::Save(const char* filename) out << "\xEF\xBB\xBF"; for (const Section §ion : sections) { - if (!section.name().empty()) { + if (!section.name().empty() && (!section.lines.empty() || !section.comment.empty())) { out << "[" << section.name() << "]" << section.comment << std::endl; }