mirror of
https://github.com/holub/mame
synced 2025-04-27 10:43:07 +03:00
imgtool: check for unrecognized options (#11671)
This commit is contained in:
parent
c40d893239
commit
6ffb563084
@ -115,6 +115,9 @@ static int parse_options(int argc, char *argv[], int minunnamed, int maxunnamed,
|
|||||||
goto error; /* Too few unnamed */
|
goto error; /* Too few unnamed */
|
||||||
|
|
||||||
util::option_resolution::entry *entry = resolution->find(name);
|
util::option_resolution::entry *entry = resolution->find(name);
|
||||||
|
if (entry == nullptr)
|
||||||
|
goto error; /* Unknown option */
|
||||||
|
|
||||||
if (entry->option_type() == util::option_guide::entry::option_type::ENUM_BEGIN)
|
if (entry->option_type() == util::option_guide::entry::option_type::ENUM_BEGIN)
|
||||||
{
|
{
|
||||||
const util::option_guide::entry *enum_value;
|
const util::option_guide::entry *enum_value;
|
||||||
|
Loading…
Reference in New Issue
Block a user