From e7ab77cc07071e97263a81315c8e554ab4e96e7d Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Fri, 18 Sep 2026 16:21:08 -0400 Subject: [PATCH] Fix MemoryPreferences::GetMultipleValue There is no guarantee on ordering of std::multimap::find https://en.cppreference.com/cpp/container/multimap/find: > If there are several elements with the requested key in the container, > any of them may be returned. --- olad/plugin_api/Preferences.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/olad/plugin_api/Preferences.cpp b/olad/plugin_api/Preferences.cpp index 32441b40d..4fe2ef9f4 100644 --- a/olad/plugin_api/Preferences.cpp +++ b/olad/plugin_api/Preferences.cpp @@ -346,7 +346,7 @@ vector MemoryPreferences::GetMultipleValue(const string &key) const { vector values; PreferencesMap::const_iterator iter; - for (iter = m_pref_map.find(key); + for (iter = m_pref_map.lower_bound(key); iter != m_pref_map.end() && iter->first == key; ++iter) { values.push_back(iter->second); }