From 61042ee5e89aea4912d9ad31d3cf52880fc00c85 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 30 Nov 2022 18:39:02 +0000 Subject: [PATCH] Cast to IntPtr if .NET < 7 --- VpSharp/src/Entities/VirtualParadiseObject.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VpSharp/src/Entities/VirtualParadiseObject.cs b/VpSharp/src/Entities/VirtualParadiseObject.cs index 71eb880..6d848ef 100644 --- a/VpSharp/src/Entities/VirtualParadiseObject.cs +++ b/VpSharp/src/Entities/VirtualParadiseObject.cs @@ -242,7 +242,11 @@ public abstract class VirtualParadiseObject : IEquatable { unsafe { +#if NET7_0_OR_GREATER data = new Span(dataPtr.ToPointer(), length); +#else + data = new Span(((IntPtr)dataPtr).ToPointer(), length); +#endif } }