diff --git a/src/asammdf/blocks/mdf_v3.py b/src/asammdf/blocks/mdf_v3.py index a6223b514..3762e5e00 100644 --- a/src/asammdf/blocks/mdf_v3.py +++ b/src/asammdf/blocks/mdf_v3.py @@ -434,6 +434,7 @@ def _load_data( data.append(stream.read(min(record_count, size))) else: data.append(stream.read(size)) + cur_size += size offset += size @@ -2042,6 +2043,8 @@ def append( block = samples.tobytes() + self._tempfile.seek(0, 2) + gp.data_location = v23c.LOCATION_TEMPORARY_FILE if cycles_nr: data_address = tell() @@ -2059,9 +2062,6 @@ def append( ) ) - else: - gp.data_location = v23c.LOCATION_TEMPORARY_FILE - self.virtual_groups_map[dg_cntr] = dg_cntr if dg_cntr not in self.virtual_groups: self.virtual_groups[dg_cntr] = VirtualChannelGroup()