From 2420bed259a6a81d5c8a4cc77e419a38f8632f19 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Mon, 21 Apr 2014 12:04:13 -0400 Subject: [PATCH] Accept no command line arguments without error. --- src/cfg.rl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cfg.rl b/src/cfg.rl index 372af40..b8f56e7 100644 --- a/src/cfg.rl +++ b/src/cfg.rl @@ -307,6 +307,8 @@ void parse_cmdline(int argc, char *argv[]) suicide("error parsing command line option: option too long"); argbl += snl; } + if (argbl == 0) + return; struct cfgparse ccfg; memset(&ccfg, 0, sizeof ccfg); const char *p = argb;