Permalink
Browse files

redis-cli: check argument existence for --pattern.

  • Loading branch information...
1 parent c1d67ea commit 5580350a7b179bffc96b277dca2958c64ac773a8 @antirez committed Feb 25, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/redis-cli.c
View
@@ -732,7 +732,7 @@ static int parseOptions(int argc, char **argv) {
config.stat_mode = 1;
} else if (!strcmp(argv[i],"--scan")) {
config.scan_mode = 1;
- } else if (!strcmp(argv[i],"--pattern")) {
+ } else if (!strcmp(argv[i],"--pattern") && !lastarg) {
config.pattern = argv[++i];
} else if (!strcmp(argv[i],"--intrinsic-latency") && !lastarg) {
config.intrinsic_latency_mode = 1;

0 comments on commit 5580350

Please sign in to comment.