Fixed ##545

This commit is contained in:
Perfare 2021-12-28 00:46:08 +08:00
parent c8169373f3
commit 59eefafcf4

View file

@ -90,7 +90,10 @@ namespace Il2CppDumper
}
}
}
for (var index = 0; index < metadata.typeDefs.Length; ++index)
foreach (var imageDef in metadata.imageDefs)
{
var typeEnd = imageDef.typeStart + imageDef.typeCount;
for (var index = imageDef.typeStart; index < typeEnd; ++index)
{
var typeDef = metadata.typeDefs[index];
var typeDefinition = typeDefinitionDic[typeDef];
@ -104,8 +107,12 @@ namespace Il2CppDumper
typeDefinition.NestedTypes.Add(nestedTypeDefinition);
}
}
}
//提前处理
for (var index = 0; index < metadata.typeDefs.Length; ++index)
foreach (var imageDef in metadata.imageDefs)
{
var typeEnd = imageDef.typeStart + imageDef.typeCount;
for (var index = imageDef.typeStart; index < typeEnd; ++index)
{
var typeDef = metadata.typeDefs[index];
var typeDefinition = typeDefinitionDic[typeDef];
@ -146,6 +153,7 @@ namespace Il2CppDumper
typeDefinition.Interfaces.Add(new InterfaceImplementation(interfaceTypeRef));
}
}
}
//处理field, method, property等等
foreach (var imageDef in metadata.imageDefs)
{