Fix length_error crash in basic_string in the ini code. (#3411)

This commit is contained in:
Timothy O'Barr 2020-05-24 00:09:11 -06:00 committed by GitHub
parent 26a4ba360f
commit 8eb1bc1986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ 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(defvalue ? "enabled" : "disabled", 8);
if (m_Config)
m_Config->Read(var, &dest, dest);
value = (dest == L"enabled") || (dest == L"1");