From 47163d979f33ee9f0d577b12cb18b3135c9dfe1b Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 24 Apr 2006 23:53:48 +0200 Subject: [PATCH] The "don't cf_load on error exit" optimization was wrong. --- lib/conf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/conf2.c b/lib/conf2.c index f6be8c6b..900e8e55 100644 --- a/lib/conf2.c +++ b/lib/conf2.c @@ -1347,7 +1347,7 @@ cf_get_opt(int argc, char * const argv[], const char *short_opts, const struct o } } else { /* unhandled option or end of options */ - if (res == -1) + if (res != ':' && res != '?') load_default(); other_options++; return res; -- 2.39.5