mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
webpmux: let -- stop parameter parsing
this enables webpmux to accept input files starting with '-' when using -get/-set/-strip; -info & -frame expect an input file as one of their parameters so no changes are necessary there. Change-Id: I154eb6dc388258a7fb743ec76ba869bf9589be1b
This commit is contained in:
@ -677,6 +677,17 @@ static int ParseCommandLine(int argc, const char* argv[],
|
||||
(version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff);
|
||||
DeleteConfig(config);
|
||||
exit(0);
|
||||
} else if (!strcmp(argv[i], "--")) {
|
||||
if (i < argc - 1) {
|
||||
++i;
|
||||
if (config->input_ == NULL) {
|
||||
config->input_ = argv[i];
|
||||
} else {
|
||||
ERROR_GOTO2("ERROR at '%s': Multiple input files specified.\n",
|
||||
argv[i], ErrParse);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
ERROR_GOTO2("ERROR: Unknown option: '%s'.\n", argv[i], ErrParse);
|
||||
}
|
||||
|
Reference in New Issue
Block a user