cwebp: let -- stop parameter parsing

this enables cwebp to accept input files starting with '-'

Change-Id: I13b506886c3df8a4e8fb350f3d365eaf7e072a4a
This commit is contained in:
James Zern
2013-12-12 20:20:08 -08:00
parent a33831e21a
commit 98af68fe26
2 changed files with 6 additions and 1 deletions

View File

@ -895,6 +895,9 @@ int main(int argc, const char *argv[]) {
#endif
} else if (!strcmp(argv[c], "-v")) {
verbose = 1;
} else if (!strcmp(argv[c], "--")) {
if (c < argc - 1) in_file = argv[++c];
break;
} else if (argv[c][0] == '-') {
fprintf(stderr, "Error! Unknown option '%s'\n", argv[c]);
HelpLong();