degesch: exit with error when arguments are given

This commit is contained in:
Přemysl Eric Janouch 2016-09-29 13:40:15 +02:00
parent 16d10f574b
commit 43de836b91
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 5 additions and 0 deletions

View File

@ -13452,6 +13452,11 @@ main (int argc, char *argv[])
opt_handler_usage (&oh, stderr); opt_handler_usage (&oh, stderr);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
if (optind != argc)
{
opt_handler_usage (&oh, stderr);
exit (EXIT_FAILURE);
}
opt_handler_free (&oh); opt_handler_free (&oh);
// We only need to convert to and from the terminal encoding // We only need to convert to and from the terminal encoding