Revision: 71807
          http://sourceforge.net/p/brlcad/code/71807
Author:   starseeker
Date:     2018-09-24 20:49:59 +0000 (Mon, 24 Sep 2018)
Log Message:
-----------
Don't pass the set_var variables to arg_process when we're asking the 
arg_process function to evaluate the validity of flag status.  This was causing 
double-setting with the _ged_vopt callback.

Modified Paths:
--------------
    brlcad/trunk/src/libbu/opt.c

Modified: brlcad/trunk/src/libbu/opt.c
===================================================================
--- brlcad/trunk/src/libbu/opt.c        2018-09-24 20:47:40 UTC (rev 71806)
+++ brlcad/trunk/src/libbu/opt.c        2018-09-24 20:49:59 UTC (rev 71807)
@@ -548,12 +548,12 @@
      * the option isn't a valid arg for this opt, opt can be a flag */
     if (desc && desc->arg_process) {
        if (arg) {
-           arg_offset = (*desc->arg_process)(NULL, 1, &arg, desc->set_var);
+           arg_offset = (*desc->arg_process)(NULL, 1, &arg, NULL);
            if (!arg_offset) {
                return 1;
            }
        } else {
-           arg_offset = (*desc->arg_process)(NULL, 0, NULL, desc->set_var);
+           arg_offset = (*desc->arg_process)(NULL, 0, NULL, NULL);
            if (!arg_offset) {
                return 1;
            }
@@ -1195,7 +1195,9 @@
        bu_free(str1, "free tmp str");
        /* If we got here, we do have three numbers */
        if (have_three) {
-           VSET(*v, v1, v2, v3);
+           if (v) {
+               VSET(*v, v1, v2, v3);
+           }
            return 1;
        }
     } else {
@@ -1229,7 +1231,9 @@
            return -1;
        }
        /* If we got here, 3 did the job */
-       VSET(*v, v1, v2, v3);
+       if (v) {
+           VSET(*v, v1, v2, v3);
+       }
        return 3;
     } else {
        /* Not valid with 1 and don't have 3 - we require at least one, so

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to