[MOAB-dev] r5457 - MOAB/trunk/itaps/imesh

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Apr 2 14:00:36 CDT 2012


Author: tautges
Date: 2012-04-02 14:00:36 -0500 (Mon, 02 Apr 2012)
New Revision: 5457

Modified:
   MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
Log:
Previous change (v5452) needs to also check sizes on entry.



Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2012-03-29 18:36:46 UTC (rev 5456)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2012-04-02 19:00:36 UTC (rev 5457)
@@ -1950,7 +1950,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_INTEGER);
     *tag_values_allocated *= sizeof(int);
-    *tag_values_size *= sizeof(int);
+    if (tag_values_size != tag_values_allocated) *tag_values_size *= sizeof(int);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      tag_values,
@@ -1970,7 +1970,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_DOUBLE);
     *tag_values_allocated *= sizeof(double);
-    *tag_values_size *= sizeof(double);
+    if (tag_values_size != tag_values_allocated) *tag_values_size *= sizeof(double);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      tag_values,
@@ -1989,7 +1989,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_ENTITY_HANDLE);
     *tag_value_allocated *= sizeof(iBase_EntityHandle);
-    *tag_value_size *= sizeof(iBase_EntityHandle);
+    if (tag_value_size != tag_value_allocated) *tag_value_size *= sizeof(iBase_EntityHandle);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      reinterpret_cast<void**>(tag_value),
@@ -2009,7 +2009,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_ENTITY_SET_HANDLE);
     *tag_value_allocated *= sizeof(iBase_EntityHandle);
-    *tag_value_size *= sizeof(iBase_EntityHandle);
+    if (tag_value_size != tag_value_allocated) *tag_value_size *= sizeof(iBase_EntityHandle);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      reinterpret_cast<void**>(tag_value),













More information about the moab-dev mailing list