reader: Fix off-by-one error in assert

* src/abg-reader.cc (build_subrange_type): Fix off-by-one error.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2020-11-27 21:11:59 +01:00
parent bbdf7e0f29
commit 264c8338cc

View File

@ -3862,7 +3862,7 @@ build_subrange_type(read_context& ctxt,
upper_bound = strtoll(CHAR_STR(s), NULL, 0);
bounds_present = true;
ABG_ASSERT(is_infinite
|| (length == (uint64_t) upper_bound - lower_bound));
|| (length == (uint64_t) upper_bound - lower_bound + 1));
}
string underlying_type_id;