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 {