Fix typeindex size calculation using the wrong max size

This commit is contained in:
Luke
2026-02-11 14:08:56 +01:00
committed by GitHub
parent 52d3176f5c
commit 02a41eccf0

View File

@@ -135,7 +135,7 @@ namespace Il2CppInspector
// thankfully, we can just guess the size based off the three available options and the known total size of
// a type entry that uses TypeIndex.
var actualSize = Header.InterfaceOffsets.SectionSize / Header.InterfaceOffsets.Count;
var maxSize = Il2CppEventDefinition.Size(tempVersion);
var maxSize = Il2CppInterfaceOffsetPair.Size(tempVersion);
int typeIndexSize;
if (actualSize == maxSize)
@@ -437,3 +437,4 @@ namespace Il2CppInspector
public int Sizeof<T>() where T : IReadable => T.Size(Version, Is32Bit);
}
}