From: Timo Heister Date: Mon, 4 Aug 2014 19:23:30 +0000 (-0400) Subject: fix wrong assert in notify_ready_to_unpack X-Git-Tag: v8.2.0-rc1~231^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46dbad2875346ba015fdeb412fc7e058a41eb405;p=dealii.git fix wrong assert in notify_ready_to_unpack 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. --- diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index c1ec69b62e..1ed1f9d74d 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -3260,7 +3260,10 @@ namespace parallel 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