Update cfgfile.cpp

Handle "1" values as TRUE, for boolean configuration options
This commit is contained in:
Dimitris Panokostas 2017-02-07 23:05:15 +01:00 committed by GitHub
parent c823e27c11
commit a52ccf522c

View file

@ -1046,7 +1046,8 @@ int cfgfile_yesno(const TCHAR* option, const TCHAR* value, const TCHAR* name, in
return 0;
if (strcasecmp(value, _T("yes")) == 0 || strcasecmp(value, _T("y")) == 0
|| strcasecmp(value, _T("true")) == 0 || strcasecmp(value, _T("t")) == 0)
|| strcasecmp(value, _T("true")) == 0 || strcasecmp(value, _T("t")) == 0
|| (numbercheck && strcasecmp(value, _T("1")) == 0))
*location = 1;
else if (strcasecmp(value, _T("no")) == 0 || strcasecmp(value, _T("n")) == 0
|| strcasecmp(value, _T("false")) == 0 || strcasecmp(value, _T("f")) == 0