From 8317fb9c260f7c88c354e06b5d65e4f2e90fbb40 Mon Sep 17 00:00:00 2001 From: "Dreyer, Lukas" Date: Mon, 17 Jun 2024 14:39:47 +0200 Subject: [PATCH] Fix offset assertion, for empty procs first tree is allowed to equal num_trees --- src/t8_forest/t8_forest_cxx.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t8_forest/t8_forest_cxx.cxx b/src/t8_forest/t8_forest_cxx.cxx index b88ac67603..d4d5e899c0 100644 --- a/src/t8_forest/t8_forest_cxx.cxx +++ b/src/t8_forest/t8_forest_cxx.cxx @@ -1241,7 +1241,7 @@ t8_forest_tree_shared (t8_forest_t forest, int first_or_last) T8_ASSERT (first_or_last == 0 || first_or_last == 1); T8_ASSERT (forest != NULL); T8_ASSERT (forest->first_local_tree > -1); - T8_ASSERT (forest->first_local_tree < forest->global_num_trees); + T8_ASSERT (forest->first_local_tree <= forest->global_num_trees); T8_ASSERT (forest->last_local_tree < forest->global_num_trees); #if T8_ENABLE_DEBUG if (forest->first_local_tree == 0 && forest->last_local_tree == -1) {