[MOAB-dev] r1265 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Thu Aug 30 09:50:36 CDT 2007


Author: kraftche
Date: 2007-08-30 09:50:36 -0500 (Thu, 30 Aug 2007)
New Revision: 1265

Modified:
   MOAB/trunk/WriteHDF5.cpp
Log:
o Don't write unnamed tags 
o Fix potential step off end of array for 1-character-long tag names



Modified: MOAB/trunk/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/WriteHDF5.cpp	2007-08-27 23:01:14 UTC (rev 1264)
+++ MOAB/trunk/WriteHDF5.cpp	2007-08-30 14:50:36 UTC (rev 1265)
@@ -1775,8 +1775,12 @@
     result = iFace->tag_get_name( *t_itor, tagname );
     if (MB_SUCCESS != result)
       return result;
-    if (tagname[0] == '_' && tagname[1] == '_')
+      // Skip anonymous tags
+    if (tagname.empty())
       continue;
+      // skip tags for which the name begins with two underscores
+    if (tagname.size() >= 2 && tagname[0] == '_' && tagname[1] == '_')
+      continue;
   
       // Add tag to export list
     SparseTag tag_data;




More information about the moab-dev mailing list