]> git.saurik.com Git - redis.git/commitdiff
fixed a small bug that caused redis-cli to segfault when given single numeric paramet...
authorJuri M. Vainonen <jvain@iki.fi>
Wed, 21 Sep 2011 20:22:14 +0000 (23:22 +0300)
committerJuri M. Vainonen <jvain@iki.fi>
Wed, 21 Sep 2011 20:22:14 +0000 (23:22 +0300)
src/redis-cli.c

index d0c9d979f014a769e88e78e311bf484f651e8f08..d01b1ed508a6c7738310745c0f2f86b7cf8510b9 100644 (file)
@@ -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;