From: Juri M. Vainonen Date: Wed, 21 Sep 2011 20:22:14 +0000 (+0300) Subject: fixed a small bug that caused redis-cli to segfault when given single numeric paramet... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/aee7f99760ec3a8d7250789f60751245c0e349e0 fixed a small bug that caused redis-cli to segfault when given single numeric parameter greater that zero. --- 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;