]> git.deb.at Git - pkg/abook.git/commitdiff
fixed boolean values handling
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Mon, 18 Mar 2002 11:42:52 +0000 (11:42 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Mon, 18 Mar 2002 11:42:52 +0000 (11:42 +0000)
options.c

index 82aae49cef02ae9566945f4559608d54e061a2e4..2f6d0bbea61630782a972d2a2cff12516a15c124 100644 (file)
--- a/options.c
+++ b/options.c
@@ -246,9 +246,9 @@ opt_set_set_option(char *var, char *p, struct option *opt)
                        set_int(opt -> data, safe_atoi(p));
                        break;
                case OT_BOOL:
-                       if(!strcasecmp(p, "true") && !strcasecmp(p, "on"))
+                       if(!strcasecmp(p, "true") || !strcasecmp(p, "on"))
                                set_bool(opt -> data, TRUE);
-                       else if(!strcasecmp(p, "false") &&
+                       else if(!strcasecmp(p, "false") ||
                                        !strcasecmp(p, "off"))
                                set_bool(opt -> data, FALSE);
                        else