tesseractmain: Fail if bad command line option is given

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-06-01 20:04:35 +02:00
parent 8d3f8111f3
commit d4ed0f841a

View File

@ -339,6 +339,10 @@ static void ParseArgs(const int argc, char** argv, const char** lang,
*image = argv[i];
} else if (*outputbase == nullptr) {
*outputbase = argv[i];
} else {
// Unexpected argument.
fprintf(stderr, "Error, unknown command line argument '%s'\n", argv[i]);
exit(1);
}
++i;
}