From aee7f99760ec3a8d7250789f60751245c0e349e0 Mon Sep 17 00:00:00 2001 From: "Juri M. Vainonen" Date: Wed, 21 Sep 2011 23:22:14 +0300 Subject: [PATCH] fixed a small bug that caused redis-cli to segfault when given single numeric parameter greater that zero. --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index d0c9d979..d01b1ed5 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -693,7 +693,7 @@ static void repl() { int repeat, skipargs = 0; repeat = atoi(argv[0]); - if (repeat) { + if (argc > 1 && repeat) { skipargs = 1; } else { repeat = 1;