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))]