Revision: 45859
          http://brlcad.svn.sourceforge.net/brlcad/?rev=45859&view=rev
Author:   bob1961
Date:     2011-08-09 22:21:47 +0000 (Tue, 09 Aug 2011)

Log Message:
-----------
Need to copy result of call to bu_brlcad_root() into local storage before 
calling bu_brlcad_data() because bu_brlcad_root() uses static char array and 
bu_brlcad_data() calls bu_brlcad_root() overwriting what was previously in the 
static array.

Modified Paths:
--------------
    brlcad/trunk/src/libtclcad/tclcadAutoPath.c

Modified: brlcad/trunk/src/libtclcad/tclcadAutoPath.c
===================================================================
--- brlcad/trunk/src/libtclcad/tclcadAutoPath.c 2011-08-09 21:51:07 UTC (rev 
45858)
+++ brlcad/trunk/src/libtclcad/tclcadAutoPath.c 2011-08-09 22:21:47 UTC (rev 
45859)
@@ -132,6 +132,7 @@
     struct bu_vls lappend;
     const char *library_path = NULL;
 
+    struct bu_vls root_buf;
     const char *root = NULL;
     const char *data = NULL;
     char buffer[MAX_BUF] = {0};
@@ -152,7 +153,10 @@
        return;
     }
 
+    bu_vls_init(&root_buf);
     root = bu_brlcad_root("", 1);
+    bu_vls_printf(&root_buf, "%s", root);
+    root = bu_vls_addr(&root_buf);
     data = bu_brlcad_data("", 1);
 
     bu_vls_init(&auto_path);
@@ -430,6 +434,7 @@
     which_argv = NULL;
     bu_vls_free(&auto_path);
     bu_vls_free(&lappend);
+    bu_vls_free(&root_buf);
 
     return;
 }


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

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to