summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/redis-cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 4a7d855d2..79a46d111 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -694,7 +694,7 @@ static void repl() {
int repeat, skipargs = 0;
repeat = atoi(argv[0]);
- if (repeat) {
+ if (argc > 1 && repeat) {
skipargs = 1;
} else {
repeat = 1;