redis-cli minor fix (less segfault is better)

This commit is contained in:
antirez 2010-04-29 20:13:23 +02:00
parent dd142b9cd7
commit 7aaaad5070

View File

@ -359,11 +359,11 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
int fd, j, retval = 0;
sds cmd;
config.raw_output = (rc->flags & CMDFLAG_RAWOUTPUT);
if (!rc) {
fprintf(stderr,"Unknown command '%s'\n",argv[0]);
return 1;
}
config.raw_output = (rc->flags & CMDFLAG_RAWOUTPUT);
if ((rc->arity > 0 && argc != rc->arity) ||
(rc->arity < 0 && argc < -rc->arity)) {