AppModel: Add WordSizeBytes; tidy up a bit

This commit is contained in:
Katy Coe
2020-08-17 02:49:01 +02:00
parent 4b86087c7a
commit 2024a3bfac
4 changed files with 8 additions and 4 deletions

View File

@@ -76,7 +76,10 @@ namespace Il2CppInspector.Model
// Convenience properties
// The word size of the binary in bits
public int WordSize => Image.Bits;
public int WordSizeBits => Image.Bits;
// The word size of the binary in bytes
public int WordSizeBytes => WordSizeBits / 8;
// The binary image
public IFileFormatReader Image => Package.BinaryImage;
@@ -317,7 +320,7 @@ namespace Il2CppInspector.Model
// Il2CppMethodPointer methodPtr;
// const MethodInfo* method;
var offsetIntoVTable = offset - GetVTableOffset();
var vidSize = WordSize == 32? 8 : 16;
var vidSize = WordSizeBits == 32? 8 : 16;
return offsetIntoVTable / vidSize;
}
}