mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +00:00
Added an error message, in case there's a typo in the definitions of long command-line options.
This commit is contained in:
parent
cd6e167982
commit
5ac11b5e88
@ -302,6 +302,10 @@ static void FileNameOption (const char* Opt, const char* Arg, StrBuf* Name)
|
||||
if (SB_NotEmpty (Name)) {
|
||||
AbEnd ("Cannot use option `%s' twice", Opt);
|
||||
}
|
||||
/* A typo in OptTab[] might allow a NULL Arg */
|
||||
if (Arg == 0) {
|
||||
Internal ("Typo in OptTab[]; option '%s' should require an argument", Opt);
|
||||
}
|
||||
/* Remember the file name for later */
|
||||
SB_CopyStr (Name, Arg);
|
||||
SB_Terminate (Name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user