Fix end method pointers being incorrect when compiler aggregates multiple methods to same start address

This commit is contained in:
Katy Coe
2019-11-28 04:08:58 +01:00
parent de846ea6db
commit b0a1ce3df7

View File

@@ -159,7 +159,7 @@ namespace Il2CppInspector
// Get sorted list of method pointers
var sortedMethodPointers = (Version <= 24.1)?
Binary.GlobalMethodPointers.OrderBy(m => m).ToList() :
Binary.ModuleMethodPointers.SelectMany(module => module.Value).OrderBy(m => m).ToList();
Binary.ModuleMethodPointers.SelectMany(module => module.Value).OrderBy(m => m).Distinct().ToList();
// Guestimate method end addresses
methodPointers = new Dictionary<ulong, ulong>(sortedMethodPointers.Count);