Cleanup: Correct offset indices slice assert

If the slice is empty, there doesn't have to be enough space for i
This commit is contained in:
Hans Goudey
2023-11-22 15:48:08 -05:00
parent 9a28852494
commit 876b624320
+1 -1
View File
@@ -85,7 +85,7 @@ template<typename T> class OffsetIndices {
*/
OffsetIndices slice(const IndexRange range) const
{
BLI_assert(offsets_.index_range().drop_back(1).contains(range.last()));
BLI_assert(range.is_empty() || offsets_.index_range().drop_back(1).contains(range.last()));
return OffsetIndices(offsets_.slice(range.start(), range.size() + 1));
}