From 43de836b919db7f5c10f63a4a788acbc2752e74f Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Thu, 29 Sep 2016 13:40:15 +0200 Subject: degesch: exit with error when arguments are given --- degesch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/degesch.c b/degesch.c index a06ef24..58fd303 100644 --- a/degesch.c +++ b/degesch.c @@ -13452,6 +13452,11 @@ main (int argc, char *argv[]) opt_handler_usage (&oh, stderr); exit (EXIT_FAILURE); } + if (optind != argc) + { + opt_handler_usage (&oh, stderr); + exit (EXIT_FAILURE); + } opt_handler_free (&oh); // We only need to convert to and from the terminal encoding -- cgit v1.2.3-70-g09d2