Fixed bug in SafeNativeArray.GetPointers

pull/436/head
David Hall 2023-10-17 21:17:14 -06:00
parent d890758b23
commit a8f752935f
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ namespace Vanara.InteropServices
/// <summary>Gets an array of pointers to each element in this native array.</summary>
/// <returns>An array of pointers to each element in this native array.</returns>
public IntPtr[] GetPointers() => Enumerable.Range(0, Count - 1).Select(i => PtrOfElem(i)).ToArray();
public IntPtr[] GetPointers() => Enumerable.Range(0, Count).Select(i => PtrOfElem(i)).ToArray();
/// <summary>Gets a reference to the structure at a specified index.</summary>
/// <param name="index">The index.</param>