Fix: BLI: Correct total_size for sliced offset indices
Its common to have 0 at the begin of an offset indices sequence. But this is not true for a slice of offset indices. Pull Request: https://projects.blender.org/blender/blender/pulls/126964
This commit is contained in:
committed by
Jacques Lucke
parent
294994e4b9
commit
ba28469e45
@@ -48,7 +48,7 @@ template<typename T> class OffsetIndices {
|
||||
/** Return the total number of elements in the referenced arrays. */
|
||||
T total_size() const
|
||||
{
|
||||
return offsets_.size() > 1 ? offsets_.last() : 0;
|
||||
return offsets_.size() > 1 ? offsets_.last() - offsets_.first() : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user