From 5fdea13859c5520a3b734cdf10a13d8904ec055a Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Tue, 12 Jan 2021 00:15:21 +0100 Subject: [PATCH] Formats: Add Section.ImageLength / VirtualLength --- Il2CppInspector.Common/FileFormatStreams/Section.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Il2CppInspector.Common/FileFormatStreams/Section.cs b/Il2CppInspector.Common/FileFormatStreams/Section.cs index 7af292e..d8bf8a4 100644 --- a/Il2CppInspector.Common/FileFormatStreams/Section.cs +++ b/Il2CppInspector.Common/FileFormatStreams/Section.cs @@ -6,7 +6,7 @@ namespace Il2CppInspector { - // A code file function export + // A code file function export - end addresses are inclusive public class Section { public ulong VirtualStart; @@ -17,5 +17,8 @@ namespace Il2CppInspector public bool IsData; public bool IsBSS; public string Name; + + public int ImageLength => (int) (ImageEnd - ImageStart) + 1; + public ulong VirtualLength => (VirtualEnd - VirtualStart) + 1; } }