metaflac : Exit with error if invalid option is passed.

Fix from Joshua Kwan <joshk@triplehelix.org> via Debian.
Closes Debian bug #329979.
This commit is contained in:
Erik de Castro Lopo 2012-02-12 20:39:09 +11:00
parent e2f80c17b7
commit cfac5975c1
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ int main(int argc, char *argv[])
setlocale(LC_ALL, "");
init_options(&options);
if(parse_options(argc, argv, &options))
if ((ret = parse_options(argc, argv, &options)) == 0)
ret = !do_operations(&options);
else
ret = 1;

View File

@ -249,7 +249,7 @@ FLAC__bool parse_options(int argc, char *argv[], CommandLineOptions *options)
}
}
return !had_error;
return had_error;
}
void free_options(CommandLineOptions *options)