From 2ac6a43a50a63e6304f1d47dabccf4f937a57275 Mon Sep 17 00:00:00 2001 From: Jeremy Pritts <49847914+ds5678@users.noreply.github.com> Date: Sat, 5 Oct 2024 13:39:45 -0700 Subject: [PATCH] Update Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppReferenceArray.cs Co-authored-by: js6pak --- .../InteropTypes/Arrays/Il2CppReferenceArray.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppReferenceArray.cs b/Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppReferenceArray.cs index c2db684b..321b8834 100644 --- a/Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppReferenceArray.cs +++ b/Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppReferenceArray.cs @@ -49,8 +49,7 @@ public override T this[int index] private IntPtr GetElementPointer(int index) { ThrowIfIndexOutOfRange(index); - var elementPointer = IntPtr.Add(ArrayStartPointer, index * ourElementTypeSize); - return elementPointer; + return IntPtr.Add(ArrayStartPointer, index * ourElementTypeSize); } [return: NotNullIfNotNull(nameof(arr))]