Browse code

shared/optparser.c: fix handling of options which are enabled by default (bb#1442)

git-svn: trunk@4881

Tomasz Kojm authored on 2009/03/03 01:08:21
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Mon Mar  2 17:09:33 CET 2009 (tk)
2
+---------------------------------
3
+ * shared/optparser.c: fix handling of options which are enabled by default
4
+		       (bb#1442)
5
+
1 6
 Sun Mar  1 17:21:15 CET 2009 (tk)
2 7
 ---------------------------------
3 8
  * COPYING.BSD -> COPYING.regex; add COPYING.sha256
... ...
@@ -572,6 +572,8 @@ static int optaddarg(struct optstruct *opts, const char *name, const char *strar
572 572
     pt->active = 1;
573 573
     if(pt->strarg || (pt->numarg && pt->numarg != -1))
574 574
 	pt->enabled = 1;
575
+    else
576
+	pt->enabled = 0;
575 577
 
576 578
     return 0;
577 579
 }