From 19d18662ea3ed5470898ed2b7bbb06d45f6004dd Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 13 Dec 2020 04:30:27 -0300 Subject: Correct type of executable sizes (#1802) --- Ryujinx.HLE/Loaders/Executables/NroExecutable.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Ryujinx.HLE/Loaders/Executables/NroExecutable.cs') diff --git a/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs b/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs index b7a887b7..7a9d04ec 100644 --- a/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs +++ b/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs @@ -7,18 +7,18 @@ namespace Ryujinx.HLE.Loaders.Executables class NroExecutable : Nro, IExecutable { public byte[] Program { get; } - public Span Text => Program.AsSpan().Slice(TextOffset, (int)Header.NroSegments[0].Size); - public Span Ro => Program.AsSpan().Slice(RoOffset, (int)Header.NroSegments[1].Size); - public Span Data => Program.AsSpan().Slice(DataOffset, (int)Header.NroSegments[2].Size); + public Span Text => Program.AsSpan().Slice((int)TextOffset, (int)Header.NroSegments[0].Size); + public Span Ro => Program.AsSpan().Slice((int)RoOffset, (int)Header.NroSegments[1].Size); + public Span Data => Program.AsSpan().Slice((int)DataOffset, (int)Header.NroSegments[2].Size); - public int TextOffset => (int)Header.NroSegments[0].FileOffset; - public int RoOffset => (int)Header.NroSegments[1].FileOffset; - public int DataOffset => (int)Header.NroSegments[2].FileOffset; - public int BssOffset => DataOffset + Data.Length; - public int BssSize => (int)Header.BssSize; + public uint TextOffset => Header.NroSegments[0].FileOffset; + public uint RoOffset => Header.NroSegments[1].FileOffset; + public uint DataOffset => Header.NroSegments[2].FileOffset; + public uint BssOffset => DataOffset + (uint)Data.Length; + public uint BssSize => Header.BssSize; - public int Mod0Offset => Start.Mod0Offset; - public int FileSize => (int)Header.Size; + public uint Mod0Offset => (uint)Start.Mod0Offset; + public uint FileSize => Header.Size; public ulong SourceAddress { get; private set; } public ulong BssAddress { get; private set; } -- cgit v1.2.3