Skip to content

Commit

Permalink
Fixed #451
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfare committed Apr 21, 2021
1 parent 65ad2bf commit 2d70941
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Il2CppDumper/Outputs/StructGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,13 @@ private void AddMetadataUsageMethodRef(ScriptJson json, uint index, ulong addres
scriptMetadataMethod.Address = il2Cpp.GetRVA(address);
(var methodSpecTypeName, var methodSpecMethodName) = executor.GetMethodSpecName(methodSpec, true);
scriptMetadataMethod.Name = "Method$" + methodSpecTypeName + "." + methodSpecMethodName + "()";
var genericMethodPointer = il2Cpp.methodSpecGenericMethodPointers[methodSpec];
if (genericMethodPointer > 0)
if (il2Cpp.methodSpecGenericMethodPointers.ContainsKey(methodSpec))
{
scriptMetadataMethod.MethodAddress = il2Cpp.GetRVA(genericMethodPointer);
var genericMethodPointer = il2Cpp.methodSpecGenericMethodPointers[methodSpec];
if (genericMethodPointer > 0)
{
scriptMetadataMethod.MethodAddress = il2Cpp.GetRVA(genericMethodPointer);
}
}
}

Expand Down

0 comments on commit 2d70941

Please sign in to comment.