diff options
author | Max Kellermann <max@duempel.org> | 2008-10-23 18:06:05 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-23 18:06:05 +0200 |
commit | 098991f8e8a974d2eee39645fa23c43a4c8b06c1 (patch) | |
tree | 89ff15b0c0aa9c6c0f7a8531818d9e2ca2d3f491 | |
parent | 2cc2420f8cb71be62851273fc4ce9bf5223155f6 (diff) | |
download | mpd-098991f8e8a974d2eee39645fa23c43a4c8b06c1.tar.gz mpd-098991f8e8a974d2eee39645fa23c43a4c8b06c1.tar.xz mpd-098991f8e8a974d2eee39645fa23c43a4c8b06c1.zip |
command: fix boolean value parser
Due to a logic error, no value was valid for the boolean value
parser. Replace "||" with "&&".
-rw-r--r-- | src/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command.c b/src/command.c index dc5c3f96a..9d0d1bfef 100644 --- a/src/command.c +++ b/src/command.c @@ -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; |