aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-04-19 13:23:36 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-04-19 13:23:39 +1200
commite81bb0377064e9bad5808c20c17be4019accbee2 (patch)
treea0c8460d95f118ad9d6ce242e937bf37f8f89be0
parent83e9348be530e55b5309b77373b08dadb0bf95e9 (diff)
downloadfractal-gen-e81bb0377064e9bad5808c20c17be4019accbee2.tar.xz
Bail out properly when no args supplied
-rw-r--r--fractal-gen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fractal-gen.c b/fractal-gen.c
index d2d21f9..855017e 100644
--- a/fractal-gen.c
+++ b/fractal-gen.c
@@ -172,6 +172,10 @@ int parse_args(int argc, char **argv)
clust_id = 0;
clust_total = 1;
+ /* bail out early if no arguments are supplied */
+ if (argc <= 1)
+ return 1;
+
while ( (opt = getopt(argc, argv, "s:i:e:c:t:N:T")) != -1 )
{
switch (opt)