redis-cli now checks the arity of vararg commnads
This commit is contained in:
parent
70003d28b8
commit
a74f2af61c
@ -224,7 +224,7 @@ static int cliSendCommand(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((rc->arity > 0 && argc != rc->arity) ||
|
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);
|
fprintf(stderr,"Wrong number of arguments for '%s'\n",rc->name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user