From 8f06aa425a07e6a10d34bc15534a159ad68a6916 Mon Sep 17 00:00:00 2001 From: Perfare Date: Fri, 10 Jun 2022 02:31:08 +0800 Subject: [PATCH] Fixed #620 --- Il2CppDumper/Utils/DummyAssemblyGenerator.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Il2CppDumper/Utils/DummyAssemblyGenerator.cs b/Il2CppDumper/Utils/DummyAssemblyGenerator.cs index 987b713..1d22fc5 100644 --- a/Il2CppDumper/Utils/DummyAssemblyGenerator.cs +++ b/Il2CppDumper/Utils/DummyAssemblyGenerator.cs @@ -668,7 +668,14 @@ namespace Il2CppDumper var val = blobValue.Value; if (typeReference.FullName == "System.Object") { - val = new CustomAttributeArgument(GetBlobValueTypeReference(blobValue, memberReference), val); + if (blobValue.il2CppTypeEnum == Il2CppTypeEnum.IL2CPP_TYPE_IL2CPP_TYPE_INDEX) + { + val = new CustomAttributeArgument(memberReference.Module.ImportReference(typeof(Type)), GetTypeReference(memberReference, (Il2CppType)val)); + } + else + { + val = new CustomAttributeArgument(GetBlobValueTypeReference(blobValue, memberReference), val); + } } else if (val == null) {