Revision: 57207
http://sourceforge.net/p/brlcad/code/57207
Author: brlcad
Date: 2013-08-28 04:27:13 +0000 (Wed, 28 Aug 2013)
Log Message:
-----------
consolidate the uuid string size into one place and initialize them to zero.
Modified Paths:
--------------
brlcad/trunk/src/conv/3dm/3dm-g.cpp
Modified: brlcad/trunk/src/conv/3dm/3dm-g.cpp
===================================================================
--- brlcad/trunk/src/conv/3dm/3dm-g.cpp 2013-08-28 04:22:13 UTC (rev 57206)
+++ brlcad/trunk/src/conv/3dm/3dm-g.cpp 2013-08-28 04:27:13 UTC (rev 57207)
@@ -41,6 +41,9 @@
#define GENERIC_NAME "rhino"
#define Usage "Usage: 3dm-g [-v vmode] [-r] [-u] -o output_file.g
input_file.3dm\n"
+/* UUID buffers must be >= 37 chars per openNURBS API */
+#define UUID_LEN 50
+
/* typedefs and global containers for building layer hierarchy */
typedef std::map< std::string, std::string> STR_STR_MAP;
typedef std::map< std::string, int> REGION_CNT_MAP;
@@ -73,7 +76,7 @@
static void
MapRegion(ONX_Model &model, std::string ®ion_name, int layer_index)
{
- char uuidstr[50];
+ char uuidstr[UUID_LEN] = {0};
std::string parent_uuid;
const ON_Layer& layer = model.m_layer_table[layer_index];
@@ -174,7 +177,7 @@
ProcessLayers(ONX_Model &model, ON_TextLog* dump)
{
struct bu_vls name = BU_VLS_INIT_ZERO;
- char uuidstr[50] = {0};
+ char uuidstr[UUID_LEN] = {0};
std::string layer_name, uuid, parent_uuid;
ON_UuidIndex uuidIndex;
int i, count = model.m_layer_table.Count();
@@ -311,7 +314,7 @@
dump->Print("\n");
if (use_uuidnames) {
- char uuidstring[37];
+ char uuidstring[UUID_LEN] = {0};
ON_UuidToString(myAttributes.m_uuid, uuidstring);
ON_String constr(uuidstring);
const char* cstr = constr;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits