Commit 7aaaad50 authored by antirez's avatar antirez
Browse files

redis-cli minor fix (less segfault is better)

parent dd142b9c
...@@ -359,11 +359,11 @@ static int cliSendCommand(int argc, char **argv, int repeat) { ...@@ -359,11 +359,11 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
int fd, j, retval = 0; int fd, j, retval = 0;
sds cmd; sds cmd;
config.raw_output = (rc->flags & CMDFLAG_RAWOUTPUT);
if (!rc) { if (!rc) {
fprintf(stderr,"Unknown command '%s'\n",argv[0]); fprintf(stderr,"Unknown command '%s'\n",argv[0]);
return 1; return 1;
} }
config.raw_output = (rc->flags & CMDFLAG_RAWOUTPUT);
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)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment