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; }