mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 07:29:07 +08:00
tesseractmain: Fail if bad command line option is given
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
8d3f8111f3
commit
d4ed0f841a
@ -339,6 +339,10 @@ static void ParseArgs(const int argc, char** argv, const char** lang,
|
|||||||
*image = argv[i];
|
*image = argv[i];
|
||||||
} else if (*outputbase == nullptr) {
|
} else if (*outputbase == nullptr) {
|
||||||
*outputbase = argv[i];
|
*outputbase = argv[i];
|
||||||
|
} else {
|
||||||
|
// Unexpected argument.
|
||||||
|
fprintf(stderr, "Error, unknown command line argument '%s'\n", argv[i]);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user