Skip to content

Commit

Permalink
Fix help message for unicharset_extractor (#1206)
Browse files Browse the repository at this point in the history
If unicharset_extractor was called without any argument,
a help message was printed by tesseract::ParseCommandLineFlags.

Replace that by the local help message which is better.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil authored and zdenop committed Nov 10, 2017
1 parent ad5ee18 commit f3c4b89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion training/unicharset_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ int Main(int argc, char** argv) {
} // namespace tesseract

int main(int argc, char** argv) {
tesseract::ParseCommandLineFlags(argv[0], &argc, &argv, true);
if (argc > 1) {
tesseract::ParseCommandLineFlags(argv[0], &argc, &argv, true);
}
if (argc < 2) {
tprintf(
"Usage: %s [--output_unicharset filename] [--norm_mode mode]"
Expand Down

0 comments on commit f3c4b89

Please sign in to comment.