[MOAB-dev] r4995 - MOAB/trunk/src
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Mon Jun 13 18:40:43 CDT 2011
Author: kraftche
Date: 2011-06-13 18:40:42 -0500 (Mon, 13 Jun 2011)
New Revision: 4995
Modified:
MOAB/trunk/src/Core.cpp
Log:
fix bug where Interface::tag_get_handle fails when asked to create a variable-length tag with a default value
Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp 2011-06-13 23:39:54 UTC (rev 4994)
+++ MOAB/trunk/src/Core.cpp 2011-06-13 23:40:42 UTC (rev 4995)
@@ -2156,7 +2156,7 @@
// that it is requesting a variable-length tag, so no need
// to also require/check the MB_TAG_VARLEN bit in the flags.
if (tag_handle->variable_length()) {
- if (size != 0 && size != MB_VARIABLE_LENGTH)
+ if (size != 0 && size != MB_VARIABLE_LENGTH && !(flags & MB_TAG_VARLEN))
return MB_INVALID_SIZE;
}
// But /do/ fail if MB_TAG_VARLEN flag is set and tag is
More information about the moab-dev
mailing list