From b004b8195bcdd1e4de76c7df7cb3781ceb5c9e71 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Wed, 30 Dec 2020 08:25:01 +0100 Subject: [PATCH] Model: Fix crash in ResolveGenericArguments with 32-bit binary rebased above 0x80000000 (#119) --- Il2CppInspector.Common/Reflection/TypeModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/Reflection/TypeModel.cs b/Il2CppInspector.Common/Reflection/TypeModel.cs index 228f70c..f6d73e0 100644 --- a/Il2CppInspector.Common/Reflection/TypeModel.cs +++ b/Il2CppInspector.Common/Reflection/TypeModel.cs @@ -175,9 +175,9 @@ namespace Il2CppInspector.Reflection public TypeInfo[] ResolveGenericArguments(Il2CppGenericInst inst) { // Get list of pointers to type parameters (both unresolved and concrete) - var genericTypeArguments = Package.BinaryImage.ReadMappedWordArray(inst.type_argv, (int)inst.type_argc); + var genericTypeArguments = Package.BinaryImage.ReadMappedArray(inst.type_argv, (int)inst.type_argc); - return genericTypeArguments.Select(a => GetTypeFromVirtualAddress((ulong) a)).ToArray(); + return genericTypeArguments.Select(a => GetTypeFromVirtualAddress(a)).ToArray(); } // Initialize type from type reference (TypeRef)