From 3c8d89929683d07dbee7b310171f12a0e49c58a1 Mon Sep 17 00:00:00 2001 From: cancel Date: Sun, 25 Nov 2018 10:44:22 +0900 Subject: [PATCH] Change to use better error message for >1 file arg --- cli_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli_main.c b/cli_main.c index cf9acc5..eab53c0 100644 --- a/cli_main.c +++ b/cli_main.c @@ -29,6 +29,9 @@ int main(int argc, char** argv) { if (optind == argc - 1) { input_file = argv[optind]; + } else if (optind < argc - 1) { + fprintf(stderr, "Expected only 1 file argument"); + return 1; } if (input_file == NULL) {