The offset will always be >=4 because we store the CellStatus in the
data sent to p4est in front of the user data. This means the smallest
offset will 4, no matter how much data is attached.
const CellStatus,
const void *)> &unpack_callback)
{
- Assert (offset < attached_data_size, ExcMessage ("invalid offset in notify_ready_to_unpack()"));
+ Assert (offset >= sizeof(CellStatus),
+ ExcMessage ("invalid offset in notify_ready_to_unpack()"));
+ Assert (offset < sizeof(CellStatus)+attached_data_size,
+ ExcMessage ("invalid offset in notify_ready_to_unpack()"));
Assert (n_attached_datas > 0, ExcMessage ("notify_ready_to_unpack() called too often"));
// Recurse over p4est and hand the caller the data back
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams