diff options
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r-- | base/commandLine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 667e0e29b5..5583eed30a 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -251,12 +251,12 @@ void registerDefaults() { // Use this for options which have a required (string) value #define DO_OPTION(shortCmd, longCmd) \ DO_OPTION_OPT(shortCmd, longCmd, 0) \ - if (!option) usage("Option '%s' requires an argument", argv[i]); + if (!option) usage("Option '%s' requires an argument", argv[i-1]); // Use this for options which have a required integer value #define DO_OPTION_INT(shortCmd, longCmd) \ DO_OPTION_OPT(shortCmd, longCmd, 0) \ - if (!option) usage("Option '%s' requires an argument", argv[i]); \ + if (!option) usage("Option '%s' requires an argument", argv[i-1]); \ char *endptr = 0; \ int intValue; intValue = (int)strtol(option, &endptr, 0); \ if (endptr == NULL || *endptr != 0) usage("--%s: Invalid number '%s'", longCmd, option); |