From 46dbad2875346ba015fdeb412fc7e058a41eb405 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 4 Aug 2014 15:23:30 -0400 Subject: [PATCH] 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. --- source/distributed/tria.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5