aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c2
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;