From b6730f024f461a46f523cf7cfcf3de9f7866aa7d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 24 Apr 2006 23:32:06 +0200 Subject: [PATCH] Don't load the default config file when an invalid option error is going to be reported. --- lib/conf2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/conf2.c b/lib/conf2.c index e87408fa..e32960f7 100644 --- a/lib/conf2.c +++ b/lib/conf2.c @@ -1353,7 +1353,8 @@ cf_get_opt(int argc, char * const argv[], const char *short_opts, const struct o } } else { /* unhandled option or end of options */ - load_default(); + if (res == -1) + load_default(); other_options++; return res; } -- 2.39.5