Allow divergent metadata/binary versions

Il2CppInspector reports the highest version of the two
This commit is contained in:
Katy Coe
2020-06-16 23:27:51 +02:00
parent 0f2fff6e70
commit b9dffd3500
2 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ namespace Il2CppInspector
public List<MetadataUsage> MetadataUsages { get; }
// Shortcuts
public double Version => Metadata.Version;
public double Version => Math.Max(Metadata.Version, Binary.Image.Version);
public Dictionary<int, string> Strings => Metadata.Strings;
public string[] StringLiterals => Metadata.StringLiterals;
@@ -332,6 +332,8 @@ namespace Il2CppInspector
// Architecture-agnostic load attempt
try {
if (Il2CppBinary.Load(image, metadata.Version) is Il2CppBinary binary) {
Console.WriteLine("IL2CPP binary version " + image.Version);
processors.Add(new Il2CppInspector(binary, metadata));
}
else {

View File

@@ -141,7 +141,7 @@
<ColumnDefinition Width="70*"></ColumnDefinition>
<ColumnDefinition Width="30*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="IL2CPP Metadata version"></Label>
<Label Grid.Row="0" Grid.Column="0" Content="IL2CPP version"></Label>
<Label Grid.Row="0" Grid.Column="1" Content="{Binding Path=Version}"></Label>
<Label Grid.Row="1" Grid.Column="0" Content="Container format"></Label>
<Label Grid.Row="1" Grid.Column="1" Content="{Binding Path=BinaryImage.Format}"></Label>