From a3a407ef3157575f13ae602d0c98cf2f235b1431 Mon Sep 17 00:00:00 2001 From: "Emden R. Gansner" Date: Fri, 27 Feb 2015 13:22:49 -0500 Subject: [PATCH] Report if argument is missing from -o flag --- lib/common/input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/common/input.c b/lib/common/input.c index f2fd649fd..c79a98e37 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -344,6 +344,10 @@ int dotneato_args_initialize(GVC_t * gvc, int argc, char **argv) break; case 'o': val = getFlagOpt(argc, argv, &i); + if (!val) { + fprintf(stderr, "Missing argument for -o flag\n"); + return (dotneato_usage(1)); + } if (! gvc->common.auto_outfile_names) gvjobs_output_filename(gvc, val); break; -- 2.40.0