Skip to content

Commit

Permalink
修复2018.4.x下可能出现的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfare committed Jan 2, 2022
1 parent ed2d602 commit 05ee90a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Il2CppDumper/Il2Cpp/Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,20 @@ public Metadata(Stream stream) : base(stream)
{
Version = 24.4;
}
var v241Plus = false;
if (Version == 24.1 && header.assembliesSize / 64 == imageDefs.Length)
{
v241Plus = true;
}
if (v241Plus)
{
Version = 24.4;
}
assemblyDefs = ReadMetadataClassArray<Il2CppAssemblyDefinition>(header.assembliesOffset, header.assembliesSize);
if (v241Plus)
{
Version = 24.1;
}
typeDefs = ReadMetadataClassArray<Il2CppTypeDefinition>(header.typeDefinitionsOffset, header.typeDefinitionsSize);
methodDefs = ReadMetadataClassArray<Il2CppMethodDefinition>(header.methodsOffset, header.methodsSize);
parameterDefs = ReadMetadataClassArray<Il2CppParameterDefinition>(header.parametersOffset, header.parametersSize);
Expand Down

0 comments on commit 05ee90a

Please sign in to comment.