From ed23f487543181c70960bad5421740d131a4b729 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 6 Mar 2024 23:44:24 +0000 Subject: [PATCH] Actually erase the things we're removing Caused by bad copy and paste --- components/config/gamesettings.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/config/gamesettings.hpp b/components/config/gamesettings.hpp index 96e0864a9e..02cf9f9b8b 100644 --- a/components/config/gamesettings.hpp +++ b/components/config/gamesettings.hpp @@ -76,8 +76,7 @@ namespace Config if (!existingDir.isEmpty()) { // non-user settings can't be removed as we can't edit the openmw.cfg they're in - std::remove_if(mDataDirs.begin(), mDataDirs.end(), - [&](const SettingValue& dir) { return isUserSetting(dir) && dir.value == existingDir; }); + mDataDirs.erase(std::remove_if(mDataDirs.begin(), mDataDirs.end(), [&](const SettingValue& dir) { return isUserSetting(dir) && dir.value == existingDir; }), mDataDirs.end()); } }