Merge pull request #8680 from Leseratte10/master

SettingsHandler: Always decode the whole settings.txt file
This commit is contained in:
JosJuice 2020-03-24 00:21:29 +01:00 committed by GitHub
commit 76b97a4183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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++;