Add 64-bit Mach-O support

This commit is contained in:
Katy Coe
2019-10-22 15:42:11 +02:00
parent e036151f4d
commit 298db65a71
4 changed files with 65 additions and 91 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright 2017 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
All rights reserved.
*/
@@ -37,7 +37,8 @@ namespace Il2CppInspector
Position = arch.Offset;
Endianness = Endianness.Little;
return MachOReader.Load(new MemoryStream(ReadBytes((int)arch.Size)));
var s = new MemoryStream(ReadBytes((int) arch.Size));
return (IFileFormatReader) MachOReader32.Load(s) ?? MachOReader64.Load(s);
}
}
}