From e10b3308c2b5b046f138f534477068d857e2b5c8 Mon Sep 17 00:00:00 2001 From: JoshuaMK <60854312+JoshuaMKW@users.noreply.github.com> Date: Sun, 23 Oct 2022 18:41:15 -0500 Subject: [PATCH] Fix patch corruption using find_if instead of remove_if --- Source/Core/Common/Debug/MemoryPatches.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/Debug/MemoryPatches.cpp b/Source/Core/Common/Debug/MemoryPatches.cpp index cbe7258bed..cd44708e15 100644 --- a/Source/Core/Common/Debug/MemoryPatches.cpp +++ b/Source/Core/Common/Debug/MemoryPatches.cpp @@ -44,7 +44,7 @@ const std::vector& MemoryPatches::GetPatches() const void MemoryPatches::UnsetPatch(u32 address) { - const auto it = std::remove_if(m_patches.begin(), m_patches.end(), + const auto it = std::find_if(m_patches.begin(), m_patches.end(), [address](const auto& patch) { return patch.address == address; }); if (it == m_patches.end())