diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index d101d8e414..7f811daadd 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -461,7 +461,7 @@ void RestoreReplacedInstruction(u32 address) { void RestoreReplacedInstructions(u32 startAddr, u32 endAddr) { // Need to be in order, or we'll hang. - if (endAddr > startAddr) + if (endAddr < startAddr) std::swap(endAddr, startAddr); const auto start = replacedInstructions.lower_bound(startAddr); const auto end = replacedInstructions.upper_bound(endAddr);