From b9dffd35000d56058705a4a39d0e25aa598b413c Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Tue, 16 Jun 2020 23:27:51 +0200 Subject: [PATCH] Allow divergent metadata/binary versions Il2CppInspector reports the highest version of the two --- Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs | 4 +++- Il2CppInspector.GUI/MainWindow.xaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs b/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs index 62a661f..46f23cc 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs @@ -29,7 +29,7 @@ namespace Il2CppInspector public List MetadataUsages { get; } // Shortcuts - public double Version => Metadata.Version; + public double Version => Math.Max(Metadata.Version, Binary.Image.Version); public Dictionary 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 { diff --git a/Il2CppInspector.GUI/MainWindow.xaml b/Il2CppInspector.GUI/MainWindow.xaml index 6e747c3..f8dfd46 100644 --- a/Il2CppInspector.GUI/MainWindow.xaml +++ b/Il2CppInspector.GUI/MainWindow.xaml @@ -141,7 +141,7 @@ - +