diff --git a/Source/Core/Common/SettingsHandler.cpp b/Source/Core/Common/SettingsHandler.cpp index cac968d502..d01e50c00c 100644 --- a/Source/Core/Common/SettingsHandler.cpp +++ b/Source/Core/Common/SettingsHandler.cpp @@ -71,10 +71,8 @@ std::string SettingsHandler::GetValue(std::string_view key) const void SettingsHandler::Decrypt() { const u8* str = m_buffer.data(); - while (*str != 0) + while (m_position < m_buffer.size()) { - if (m_position >= m_buffer.size()) - return; decoded.push_back((u8)(m_buffer[m_position] ^ m_key)); m_position++; str++;