From 17c54d5a694a1d324228b8fd6d33f0344fda80cd Mon Sep 17 00:00:00 2001 From: wraitii Date: Wed, 16 Jun 2021 15:54:55 +0000 Subject: [PATCH] Fix options occasionally thinking they've been modified when they haven't. std::array leave the values in an undefined state which can very well be 'true'. Tested By: Freagarach Fixes #6205 Differential Revision: https://code.wildfiregames.com/D4170 This was SVN commit r25802. --- source/ps/ConfigDB.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/ps/ConfigDB.cpp b/source/ps/ConfigDB.cpp index 94b1e46114..834347fe29 100644 --- a/source/ps/ConfigDB.cpp +++ b/source/ps/ConfigDB.cpp @@ -143,6 +143,7 @@ CConfigDB* CConfigDB::Instance() CConfigDB::CConfigDB() { + m_HasChanges.fill(false); } CConfigDB::~CConfigDB() @@ -443,6 +444,7 @@ bool CConfigDB::Reload(EConfigNamespace ns) LOGERROR("Config file does not have a new line after the last config setting '%s'", name); m_Map[ns].swap(newMap); + m_HasChanges[ns] = false; return true; }