From cba4acc54bbf117026a9d79e6f29f1304ae9ae46 Mon Sep 17 00:00:00 2001 From: Florian Bach Date: Fri, 20 Mar 2020 16:07:35 +0100 Subject: [PATCH] SettingsHandler: Always decode the whole settings.txt file --- Source/Core/Common/SettingsHandler.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/Common/SettingsHandler.cpp b/Source/Core/Common/SettingsHandler.cpp index cac968d50200..d01e50c00cbd 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++;