]> git.saurik.com Git - redis.git/blobdiff - redis-cli.c
redis-cli now checks the arity of vararg commnads
[redis.git] / redis-cli.c
index f6bf739b3696e6f1caa02b03074321c740e0bf68..38c986b34b81e32a757140ef395af698bd7b1c7e 100644 (file)
@@ -224,7 +224,7 @@ static int cliSendCommand(int argc, char **argv) {
     }
 
     if ((rc->arity > 0 && argc != rc->arity) ||
-        (rc->arity < 0 && argc < rc->arity)) {
+        (rc->arity < 0 && argc < -rc->arity)) {
             fprintf(stderr,"Wrong number of arguments for '%s'\n",rc->name);
             return 1;
     }