.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Memory2D<T> and ReadOnlyMemory2D<T> instances created from a MemoryManager calculate the offset field in units of T instead of byte in the constructor. Since this fix in v8.2.1 where Span creation was changed to Unsafe.AddByteOffset, this causes incorrect indexing into the span.
Fixes were added for NET6 or greater.
PR Checklist
[X] Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
[X] Based off latest main branch of toolkit
[X] PR doesn't include merge commits (always rebase on top of our main, if needed)
Closes #742
Overview
Memory2D<T>
andReadOnlyMemory2D<T>
instances created from aMemoryManager
calculate theoffset
field in units ofT
instead ofbyte
in the constructor. Since this fix in v8.2.1 whereSpan
creation was changed toUnsafe.AddByteOffset
, this causes incorrect indexing into the span.Fixes were added for NET6 or greater.
PR Checklist