diff --git a/src/Cafe/HW/Espresso/Debugger/DebugSymbolStorage.h b/src/Cafe/HW/Espresso/Debugger/DebugSymbolStorage.h index aba6a9b5..0a46951d 100644 --- a/src/Cafe/HW/Espresso/Debugger/DebugSymbolStorage.h +++ b/src/Cafe/HW/Espresso/Debugger/DebugSymbolStorage.h @@ -45,12 +45,17 @@ public: static void ClearRange(MPTR address, uint32 length) { + if (length == 0) + return; s_lock.lock(); - while (length > 0) + for (;;) { auto itr = s_typeStorage.find(address); if (itr != s_typeStorage.end()) s_typeStorage.erase(itr); + + if (length <= 4) + break; address += 4; length -= 4; } @@ -60,4 +65,4 @@ public: private: static FSpinlock s_lock; static std::unordered_map s_typeStorage; -}; \ No newline at end of file +};