X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1af292a686568e354b0886fcde3b280d1c845d30..f239a20092359e3c914adb79bd39f3f5d2b2e06f:/src/common/config.cpp?ds=sidebyside diff --git a/src/common/config.cpp b/src/common/config.cpp index 636b490e39..12c8213002 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -221,7 +221,15 @@ bool wxConfigBase::DoReadBool(const wxString& key, bool* val) const if ( !DoReadLong(key, &l) ) return false; - wxASSERT_MSG( l == 0 || l == 1, wxT("bad bool value in wxConfig::DoReadInt") ); + if ( l != 0 && l != 1 ) + { + // Don't assert here as this could happen in the result of user editing + // the file directly and this not indicate a bug in the program but + // still complain that something is wrong. + wxLogWarning(_("Invalid value %ld for a boolean key \"%s\" in " + "config file."), + l, key); + } *val = l != 0;