修复bug

This commit is contained in:
Perfare 2020-03-31 06:57:52 +08:00
parent 4cddf5de8b
commit 5ed602768a
2 changed files with 8 additions and 4 deletions

View file

@ -77,8 +77,10 @@ namespace Il2CppDumper
}
if (Version >= 22)
{
reversePInvokeWrappers = MapVATR<ulong>(pCodeRegistration.reversePInvokeWrappers, pCodeRegistration.reversePInvokeWrapperCount);
unresolvedVirtualCallPointers = MapVATR<ulong>(pCodeRegistration.unresolvedVirtualCallPointers, pCodeRegistration.unresolvedVirtualCallCount);
if (pCodeRegistration.reversePInvokeWrapperCount != 0)
reversePInvokeWrappers = MapVATR<ulong>(pCodeRegistration.reversePInvokeWrappers, pCodeRegistration.reversePInvokeWrapperCount);
if (pCodeRegistration.unresolvedVirtualCallCount != 0)
unresolvedVirtualCallPointers = MapVATR<ulong>(pCodeRegistration.unresolvedVirtualCallPointers, pCodeRegistration.unresolvedVirtualCallCount);
}
genericInsts = Array.ConvertAll(MapVATR<ulong>(pMetadataRegistration.genericInsts, pMetadataRegistration.genericInstsCount), x => MapVATR<Il2CppGenericInst>(x));
fieldOffsetsArePointers = Version > 21;

View file

@ -224,8 +224,10 @@ namespace Il2CppDumper
orderedPointers.AddRange(il2Cpp.customAttributeGenerators);
if (il2Cpp.Version >= 22)
{
orderedPointers.AddRange(il2Cpp.reversePInvokeWrappers);
orderedPointers.AddRange(il2Cpp.unresolvedVirtualCallPointers);
if (il2Cpp.reversePInvokeWrappers != null)
orderedPointers.AddRange(il2Cpp.reversePInvokeWrappers);
if (il2Cpp.unresolvedVirtualCallPointers != null)
orderedPointers.AddRange(il2Cpp.unresolvedVirtualCallPointers);
}
//TODO interopData内也包含函数
orderedPointers = orderedPointers.Distinct().OrderBy(x => x).ToList();