command: fix boolean value parser
Due to a logic error, no value was valid for the boolean value parser. Replace "||" with "&&".
This commit is contained in:
parent
2cc2420f8c
commit
098991f8e8
|
@ -186,7 +186,7 @@ check_bool(struct client *client, bool *value_r, const char *s)
|
|||
char *endptr;
|
||||
|
||||
value = strtol(s, &endptr, 10);
|
||||
if (*endptr != 0 || value != 0 || value != 1) {
|
||||
if (*endptr != 0 || (value != 0 && value != 1)) {
|
||||
command_error(client, ACK_ERROR_ARG,
|
||||
"Boolean (0/1) expected: %s", s);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue