IL2CPP: Fix field offsets for certain 64-bit binaries (#10)

This commit is contained in:
Katy Coe
2020-01-06 08:54:52 +01:00
parent a3fd260afc
commit 0b868aae36
4 changed files with 13 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
Copyright 2017-2020 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
All rights reserved.
*/
@@ -152,7 +152,7 @@ namespace Il2CppInspector
}
for (var f = 0; f < def.field_count; f++)
offsets.Add(def.fieldStart + f, available? BinaryImage.ReadWord() : 0);
offsets.Add(def.fieldStart + f, available? BinaryImage.ReadUInt32() : 0);
}
}

View File

@@ -87,13 +87,13 @@ namespace Il2CppTests.TestSources
{
// Fields
private int[] foo; // 0x10
private int[] bar; // 0x20
private float[][] arrayOfArrays; // 0x30
private float[,] twoDimensionalArray; // 0x40
private float[,,] threeDimensionalArray; // 0x50
private unsafe int*[] arrayOfPointer; // 0x10
private unsafe int** pointerToPointer; // 0x19
private unsafe float*[][,,][] confusedElephant; // 0x8047EDC0
private int[] bar; // 0x18
private float[][] arrayOfArrays; // 0x20
private float[,] twoDimensionalArray; // 0x28
private float[,,] threeDimensionalArray; // 0x30
private unsafe int*[] arrayOfPointer; // 0x38
private unsafe int** pointerToPointer; // 0x40
private unsafe float*[][,,][] confusedElephant; // 0x48
// Properties
public unsafe int* PointerProperty { get; set; } // 0x00000001801513A0-0x00000001801513B0 0x00000001801140B0-0x00000001801140C0

View File

@@ -98,9 +98,9 @@ namespace Il2CppTests.TestSources
{
// Fields
private ExampleKind kindValue; // 0x10
private string noteValue; // 0x20
private string[] arrayStrings; // 0x29
private int[] arrayNumbers; // 0x8047D628
private string noteValue; // 0x18
private string[] arrayStrings; // 0x20
private int[] arrayNumbers; // 0x28
// Properties
public ExampleKind Kind { get => default; } // 0x00000001800ECD10-0x00000001800ECD20

View File

@@ -87,7 +87,7 @@ namespace Il2CppTests.TestSources
{
// Fields
private float floatField; // 0x10
private Test test; // 0x10
private Test test; // 0x18
// Constructors
public Test() {} // 0x00000001800E2000-0x00000001800E2010