Skip to content

Commit

Permalink
SettingsHandler: Always decode the whole settings.txt file
Browse files Browse the repository at this point in the history
  • Loading branch information
Leseratte10 committed Mar 20, 2020
1 parent 9ac2805 commit cba4acc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Source/Core/Common/SettingsHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit cba4acc

Please sign in to comment.