From ee2f20dfdeb11ee1e2f432fab623e956b4720b4d 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 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;