Fixes to Arch WX length_error (#3625)

This commit is contained in:
Timothy O'Barr 2020-08-22 20:59:15 -07:00 committed by GitHub
parent 3324043d21
commit dc5bfbb470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -170,7 +170,12 @@ void IniLoader::Entry(const wxString &var, uint &value, const uint defvalue)
void IniLoader::Entry(const wxString &var, bool &value, const bool defvalue)
{
// TODO : Stricter value checking on enabled/disabled?
wxString dest(defvalue ? L"enabled" : L"disabled");
wxString dest;
if(defvalue)
dest = wxString("enabled");
else
dest = wxString("disabled");
if (m_Config)
m_Config->Read(var, &dest, dest);
value = (dest == L"enabled") || (dest == L"1");