]> mj.ucw.cz Git - libucw.git/commitdiff
The "don't cf_load on error exit" optimization was wrong.
authorMartin Mares <mj@ucw.cz>
Mon, 24 Apr 2006 21:53:48 +0000 (23:53 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 24 Apr 2006 21:53:48 +0000 (23:53 +0200)
lib/conf2.c

index f6be8c6bc344797d6ca229110a33a343cc17c340..900e8e5528c2398ffa2528638677824df3b7a987 100644 (file)
@@ -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;