From 7c05ffe6bd3363f09907cfc8a646550ea4612a5e Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 22 Jul 2024 16:53:36 -0600 Subject: [PATCH] ConfigParser: Fixed issue with @ Include insertion position during recursive loading of ini files Previously, the insertion position of sections was not reset to the correct position when returning from a recursive call. For more info, see here: https://forum.rainmeter.net/viewtopic.php?t=44016 --- Library/ConfigParser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/ConfigParser.cpp b/Library/ConfigParser.cpp index 373852733..556bf59a8 100644 --- a/Library/ConfigParser.cpp +++ b/Library/ConfigParser.cpp @@ -2069,7 +2069,13 @@ void ConfigParser::ReadIniFile(const std::wstring& iniFile, LPCTSTR skinSection, } } + // Save the section insertion position in case the included file also uses an @Include + std::list::const_iterator prevInsertPos = m_SectionInsertPos; + ReadIniFile(value, skinSection, depth + 1); + + // Reset the section insertion position to previous position + m_SectionInsertPos = prevInsertPos; } } else