Commit 098991f8 authored by Max Kellermann's avatar Max Kellermann

command: fix boolean value parser

Due to a logic error, no value was valid for the boolean value parser. Replace "||" with "&&".
parent 2cc2420f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment