mirror of https://github.com/dahall/Vanara.git
Fixed bug in GetBytes method
parent
6531317528
commit
9c97ccfd14
|
@ -162,7 +162,7 @@ namespace Vanara.InteropServices
|
||||||
{
|
{
|
||||||
if (startIndex < 0 || startIndex + count > Size) throw new ArgumentOutOfRangeException();
|
if (startIndex < 0 || startIndex + count > Size) throw new ArgumentOutOfRangeException();
|
||||||
var ret = new byte[count];
|
var ret = new byte[count];
|
||||||
Marshal.Copy(handle, ret, startIndex, count);
|
Marshal.Copy(handle.Offset(startIndex), ret, 0, count);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue