From: Daniel Arndt Date: Fri, 13 Jan 2017 16:54:27 +0000 (+0100) Subject: Check that add_indices respects index_space_size X-Git-Tag: v8.5.0-rc1~248^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb623627db60fe710b89c7ffb5bd30505d124a6f;p=dealii.git Check that add_indices respects index_space_size --- diff --git a/source/base/index_set.cc b/source/base/index_set.cc index c8efcf2489..d344745e6e 100644 --- a/source/base/index_set.cc +++ b/source/base/index_set.cc @@ -393,6 +393,11 @@ IndexSet::add_indices(const IndexSet &other, if ((this == &other) && (offset == 0)) return; + Assert (other.ranges.size() == 0 + || other.ranges.back().end-1 < index_space_size, + ExcIndexRangeType (other.ranges.back().end-1, + 0, index_space_size)); + compress(); other.compress();