SettingsHandler: Always decode the whole settings.txt file

This commit is contained in:
Florian Bach 2020-03-20 16:07:35 +01:00
parent 9ac28054df
commit cba4acc54b
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++;