mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
Fix wrong error message as pointed out by jvprat. I.e. ./scummvm -g produced:
"Option '(null)' requires an argument" svn-id: r26941
This commit is contained in:
parent
ea2fb0a211
commit
da8097896e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user