[MOAB-dev] r1960 - MOAB/trunk
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Sun Jun 29 20:59:45 CDT 2008
Author: tautges
Date: 2008-06-29 20:59:45 -0500 (Sun, 29 Jun 2008)
New Revision: 1960
Modified:
MOAB/trunk/TypeSequenceManager.cpp
Log:
Third time pays for all. This time, in TSM::is_free_sequence was true, so there was a free sequence; SM::create_entity_sequence then called SM::new_sequence_size, which used the first handle of the next higher sequence to compute the size, when the start handle of the data on which that first handle was allocated was smaller. Sigh.
Modified: MOAB/trunk/TypeSequenceManager.cpp
===================================================================
--- MOAB/trunk/TypeSequenceManager.cpp 2008-06-30 01:34:58 UTC (rev 1959)
+++ MOAB/trunk/TypeSequenceManager.cpp 2008-06-30 01:59:45 UTC (rev 1960)
@@ -576,8 +576,11 @@
const_iterator it = lower_bound( after_this );
if (it == end())
return CREATE_HANDLE( TYPE_FROM_HANDLE(after_this), MB_END_ID, junk );
- else if ((*it)->start_handle() > after_this)
- return (*it)->start_handle() - 1;
+ else if ((*it)->start_handle() > after_this) {
+ // need to check against the sequence data first
+ MBEntityHandle rhandle = std::min((*it)->start_handle(), (*it)->data()->start_handle());
+ return rhandle - 1;
+ }
else
return 0;
}
More information about the moab-dev
mailing list