Skip to content
Snippets Groups Projects
Commit 3fd6704e authored by rswindell's avatar rswindell
Browse files

parseBool() will now only return FALSE (0) or TRUE (1) and no other non-zero

values.
parseBool() now treats "yes" to be the same as "true".
parent 1d3a1cf6
Branches
Tags
No related merge requests found
......@@ -920,12 +920,10 @@ double iniGetFloat(str_list_t* list, const char* section, const char* key, doubl
static BOOL parseBool(const char* value)
{
if(!stricmp(value,"TRUE"))
if(!stricmp(value,"TRUE") || !stricmp(value,"YES"))
return(TRUE);
if(!stricmp(value,"FALSE"))
return(FALSE);
return(strtol(value,NULL,0));
return(INT_TO_BOOL(strtol(value,NULL,0)));
}
BOOL iniReadBool(FILE* fp, const char* section, const char* key, BOOL deflt)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment