[MOAB-dev] r4065 - MOAB/trunk/src/io

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Jul 22 10:18:18 CDT 2010


Author: kraftche
Date: 2010-07-22 10:18:17 -0500 (Thu, 22 Jul 2010)
New Revision: 4065

Modified:
   MOAB/trunk/src/io/ReadHDF5.cpp
Log:
fix partial read of dense-formatted tag data

Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2010-07-21 22:30:04 UTC (rev 4064)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2010-07-22 15:18:17 UTC (rev 4065)
@@ -3050,16 +3050,16 @@
     else {
       size_t beg = std::max(start_id, l->begin);
       f_ins = file_ids.insert( f_ins, beg, l->begin + l->count - 1 );
-      h_ins = handles.insert( h_ins, l->value + (beg - l->begin), l->begin + l->value - 1 );
+      h_ins = handles.insert( h_ins, l->value + (beg - l->begin), l->value + l->count - 1 );
+      for (++l; l != u; ++l) {
+        f_ins = file_ids.insert( f_ins, l->begin, l->begin + l->count - 1 );
+        h_ins = handles.insert( h_ins, l->value, l->value + l->count - 1 );
+      }
       if (u != idMap.end() && u->begin < start_id + num_values) {
         size_t end = std::min( start_id + num_values, u->begin + u->count - 1 );
         f_ins = file_ids.insert( f_ins, u->begin, end );
         h_ins = handles.insert( h_ins, u->value, u->value + end - u->begin );
       }
-      for (++l; l != u; ++l) {
-        f_ins = file_ids.insert( f_ins, l->begin, l->begin + l->count - 1 );
-        h_ins = handles.insert( h_ins, l->value, l->value + l->count - 1 );
-      }
     }
   }
   



























More information about the moab-dev mailing list