aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/Loaders/Executables/KipExecutable.cs')
-rw-r--r--Ryujinx.HLE/Loaders/Executables/KipExecutable.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs b/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs
index 292e360b..12730cd3 100644
--- a/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs
+++ b/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs
@@ -7,19 +7,19 @@ namespace Ryujinx.HLE.Loaders.Executables
class KipExecutable : IExecutable
{
public byte[] Program { get; }
- public Span<byte> Text => Program.AsSpan().Slice(TextOffset, TextSize);
- public Span<byte> Ro => Program.AsSpan().Slice(RoOffset, RoSize);
- public Span<byte> Data => Program.AsSpan().Slice(DataOffset, DataSize);
+ public Span<byte> Text => Program.AsSpan().Slice((int)TextOffset, (int)TextSize);
+ public Span<byte> Ro => Program.AsSpan().Slice((int)RoOffset, (int)RoSize);
+ public Span<byte> Data => Program.AsSpan().Slice((int)DataOffset, (int)DataSize);
- public int TextOffset { get; }
- public int RoOffset { get; }
- public int DataOffset { get; }
- public int BssOffset { get; }
+ public uint TextOffset { get; }
+ public uint RoOffset { get; }
+ public uint DataOffset { get; }
+ public uint BssOffset { get; }
- public int TextSize { get; }
- public int RoSize { get; }
- public int DataSize { get; }
- public int BssSize { get; }
+ public uint TextSize { get; }
+ public uint RoSize { get; }
+ public uint DataSize { get; }
+ public uint BssSize { get; }
public int[] Capabilities { get; }
public bool UsesSecureMemory { get; }
@@ -38,11 +38,11 @@ namespace Ryujinx.HLE.Loaders.Executables
reader.Initialize(inStorage).ThrowIfFailure();
- TextOffset = reader.Segments[0].MemoryOffset;
- RoOffset = reader.Segments[1].MemoryOffset;
- DataOffset = reader.Segments[2].MemoryOffset;
- BssOffset = reader.Segments[3].MemoryOffset;
- BssSize = reader.Segments[3].Size;
+ TextOffset = (uint)reader.Segments[0].MemoryOffset;
+ RoOffset = (uint)reader.Segments[1].MemoryOffset;
+ DataOffset = (uint)reader.Segments[2].MemoryOffset;
+ BssOffset = (uint)reader.Segments[3].MemoryOffset;
+ BssSize = (uint)reader.Segments[3].Size;
StackSize = reader.StackSize;
@@ -71,15 +71,15 @@ namespace Ryujinx.HLE.Loaders.Executables
DataSize = DecompressSection(reader, KipReader.SegmentType.Data, DataOffset, Program);
}
- private static int DecompressSection(KipReader reader, KipReader.SegmentType segmentType, int offset, byte[] program)
+ private static uint DecompressSection(KipReader reader, KipReader.SegmentType segmentType, uint offset, byte[] program)
{
reader.GetSegmentSize(segmentType, out int uncompressedSize).ThrowIfFailure();
- var span = program.AsSpan().Slice(offset, uncompressedSize);
+ var span = program.AsSpan().Slice((int)offset, uncompressedSize);
reader.ReadSegment(segmentType, span).ThrowIfFailure();
- return uncompressedSize;
+ return (uint)uncompressedSize;
}
}
} \ No newline at end of file