Allow for any non 0 and the string to also be true. These are the tests used elsewhere in the xrdp code.

ulab-next
LawrenceK 12 years ago
parent e632bc794b
commit e47a9cea97

@ -424,9 +424,10 @@ internalInitAndAllocStruct(void)
int APP_CC
text2bool(char *s)
{
if (0 == g_strcasecmp(s, "1") ||
0 == g_strcasecmp(s, "true") ||
0 == g_strcasecmp(s, "yes"))
if ( (g_atoi(s) != 0) ||
(0 == g_strcasecmp(s, "true")) ||
(0 == g_strcasecmp(s, "on")) ||
(0 == g_strcasecmp(s, "yes")))
{
return 1;
}

Loading…
Cancel
Save