Commit fa97ef34 authored by git-hulk's avatar git-hulk
Browse files

FIX: core dump in redis-benchmark when the `-r` is the last arg

parent d044e33c
...@@ -1294,7 +1294,7 @@ int parseOptions(int argc, const char **argv) { ...@@ -1294,7 +1294,7 @@ int parseOptions(int argc, const char **argv) {
if (*p < '0' || *p > '9') goto invalid; if (*p < '0' || *p > '9') goto invalid;
} }
config.randomkeys = 1; config.randomkeys = 1;
config.randomkeys_keyspacelen = atoi(argv[++i]); config.randomkeys_keyspacelen = atoi(next);
if (config.randomkeys_keyspacelen < 0) if (config.randomkeys_keyspacelen < 0)
config.randomkeys_keyspacelen = 0; config.randomkeys_keyspacelen = 0;
} else if (!strcmp(argv[i],"-q")) { } else if (!strcmp(argv[i],"-q")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment