1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-10 05:15:42 +00:00

Cast to IntPtr if .NET < 7

This commit is contained in:
Oliver Booth 2022-11-30 18:39:02 +00:00
parent b95de092f8
commit 61042ee5e8
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634

View File

@ -242,7 +242,11 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
{ {
unsafe unsafe
{ {
#if NET7_0_OR_GREATER
data = new Span<byte>(dataPtr.ToPointer(), length); data = new Span<byte>(dataPtr.ToPointer(), length);
#else
data = new Span<byte>(((IntPtr)dataPtr).ToPointer(), length);
#endif
} }
} }