From b533431c665381fe178dc8c339c3ef72d9d087c9 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 14 Jan 2020 16:28:36 -0500 Subject: display an error if too many directories are specified --- maje.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maje.c b/maje.c index b04df7f..9ba22c2 100644 --- a/maje.c +++ b/maje.c @@ -24,6 +24,11 @@ int main(int argc, char *argv[]) } } + if (optind < argc - 1) { + fprintf(stderr, "maje: extra operands\n"); + return 1; + } + srcdir = argv[optind]; if (srcdir == NULL) { -- cgit v1.2.1