COMMON: Fix Span::toStream() when given index
When providing an index but no numEntries, the computed numEntries is not adjust for index and an error is thrown
This commit is contained in:
parent
59d9975912
commit
d4ecbbc5d3
1 changed files with 1 additions and 1 deletions
|
@ -433,7 +433,7 @@ public:
|
|||
|
||||
inline MemoryReadStream toStream(const index_type index = 0, size_type numEntries = kSpanMaxSize) const {
|
||||
if (numEntries == kSpanMaxSize) {
|
||||
numEntries = impl().size();
|
||||
numEntries = impl().size() - index;
|
||||
}
|
||||
|
||||
impl().validate(index, numEntries * sizeof(value_type));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue