aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Loaders/Executables
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/Loaders/Executables')
-rw-r--r--Ryujinx.HLE/Loaders/Executables/KipExecutable.cs8
-rw-r--r--Ryujinx.HLE/Loaders/Executables/NroExecutable.cs6
-rw-r--r--Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs8
3 files changed, 11 insertions, 11 deletions
diff --git a/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs b/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs
index be5b61a2..2073a7e2 100644
--- a/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs
+++ b/Ryujinx.HLE/Loaders/Executables/KipExecutable.cs
@@ -8,9 +8,9 @@ namespace Ryujinx.HLE.Loaders.Executables
class KipExecutable : IExecutable
{
public byte[] Program { get; }
- 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 Span<byte> Text => Program.AsSpan((int)TextOffset, (int)TextSize);
+ public Span<byte> Ro => Program.AsSpan((int)RoOffset, (int)RoSize);
+ public Span<byte> Data => Program.AsSpan((int)DataOffset, (int)DataSize);
public uint TextOffset { get; }
public uint RoOffset { get; }
@@ -76,7 +76,7 @@ namespace Ryujinx.HLE.Loaders.Executables
{
reader.GetSegmentSize(segmentType, out int uncompressedSize).ThrowIfFailure();
- var span = program.AsSpan().Slice((int)offset, uncompressedSize);
+ var span = program.AsSpan((int)offset, uncompressedSize);
reader.ReadSegment(segmentType, span).ThrowIfFailure();
diff --git a/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs b/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs
index 5e8e4bd4..621ab43b 100644
--- a/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs
+++ b/Ryujinx.HLE/Loaders/Executables/NroExecutable.cs
@@ -7,9 +7,9 @@ namespace Ryujinx.HLE.Loaders.Executables
class NroExecutable : Nro, IExecutable
{
public byte[] Program { get; }
- public Span<byte> Text => Program.AsSpan().Slice((int)TextOffset, (int)Header.NroSegments[0].Size);
- public Span<byte> Ro => Program.AsSpan().Slice((int)RoOffset, (int)Header.NroSegments[1].Size);
- public Span<byte> Data => Program.AsSpan().Slice((int)DataOffset, (int)Header.NroSegments[2].Size);
+ public Span<byte> Text => Program.AsSpan((int)TextOffset, (int)Header.NroSegments[0].Size);
+ public Span<byte> Ro => Program.AsSpan((int)RoOffset, (int)Header.NroSegments[1].Size);
+ public Span<byte> Data => Program.AsSpan((int)DataOffset, (int)Header.NroSegments[2].Size);
public uint TextOffset => Header.NroSegments[0].FileOffset;
public uint RoOffset => Header.NroSegments[1].FileOffset;
diff --git a/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs b/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
index 4f1c4ca1..f983536c 100644
--- a/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
+++ b/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
@@ -12,9 +12,9 @@ namespace Ryujinx.HLE.Loaders.Executables
class NsoExecutable : IExecutable
{
public byte[] Program { get; }
- 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 Span<byte> Text => Program.AsSpan((int)TextOffset, (int)TextSize);
+ public Span<byte> Ro => Program.AsSpan((int)RoOffset, (int)RoSize);
+ public Span<byte> Data => Program.AsSpan((int)DataOffset, (int)DataSize);
public uint TextOffset { get; }
public uint RoOffset { get; }
@@ -58,7 +58,7 @@ namespace Ryujinx.HLE.Loaders.Executables
{
reader.GetSegmentSize(segmentType, out uint uncompressedSize).ThrowIfFailure();
- var span = Program.AsSpan().Slice((int)offset, (int)uncompressedSize);
+ var span = Program.AsSpan((int)offset, (int)uncompressedSize);
reader.ReadSegment(segmentType, span).ThrowIfFailure();