From c567248b736541b80ffe0bf501d91e9d61390c71 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Wed, 8 Jan 2025 05:28:53 +0100 Subject: [PATCH] Common/IniFile: Fix case sensitivity mismatch in IniFile::Section::Delete() values uses a case insensitive comparison, so erasing the equivalent key in keys_order also must do so. --- Source/Core/Common/IniFile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/IniFile.cpp b/Source/Core/Common/IniFile.cpp index b345f6c0fe..6e6749cb0d 100644 --- a/Source/Core/Common/IniFile.cpp +++ b/Source/Core/Common/IniFile.cpp @@ -85,7 +85,8 @@ bool IniFile::Section::Delete(std::string_view key) return false; values.erase(it); - keys_order.erase(std::ranges::find(keys_order, key)); + keys_order.erase(std::ranges::find_if( + keys_order, [&](std::string_view v) { return CaseInsensitiveEquals(key, v); })); return true; }