Revision: 71658
          http://sourceforge.net/p/brlcad/code/71658
Author:   starseeker
Date:     2018-09-05 15:27:22 +0000 (Wed, 05 Sep 2018)
Log Message:
-----------
Don't return the results of the 'who' call here...

Modified Paths:
--------------
    brlcad/trunk/src/mged/cmd.c

Modified: brlcad/trunk/src/mged/cmd.c
===================================================================
--- brlcad/trunk/src/mged/cmd.c 2018-09-05 15:26:33 UTC (rev 71657)
+++ brlcad/trunk/src/mged/cmd.c 2018-09-05 15:27:22 UTC (rev 71658)
@@ -635,9 +635,13 @@
 
     /* redraw any objects specified that are already drawn */
     if (argc > 1) {
+       struct bu_vls rcache = BU_VLS_INIT_ZERO;
        int who_ret;
        const char *who_cmd[2] = {"who", NULL};
 
+       /* Stash previous result string state so who cmd doesn't replace it */
+       bu_vls_sprintf(&rcache, "%s", bu_vls_addr(gedp->ged_result_str));
+
        who_ret = ged_who(gedp, 1, who_cmd);
        if (who_ret == GED_OK) {
            /* worst possible is a bunch of 1-char names, allocate and
@@ -668,6 +672,10 @@
            bu_free(who_argv, "who_argv");
            bu_free(str, "result strdup");
        }
+
+       /* Restore ged result str */
+       bu_vls_sprintf(gedp->ged_result_str, "%s", bu_vls_addr(&rcache));
+       bu_vls_free(&rcache);
     }
 
     if (ret & GED_HELP || ret == GED_OK)

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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to