1
1
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2025-08-23 21:56:28 -05:00

ReadBytes function in AMemory, with cleaner range check. (#136)

This commit is contained in:
riperiperi
2018-06-09 01:15:02 +01:00
committed by gdkchan
parent 39ebb83453
commit 6fe51f9705
12 changed files with 46 additions and 47 deletions

View File

@@ -22,18 +22,6 @@ namespace ChocolArm64.Memory
}
}
public static byte[] ReadBytes(AMemory Memory, long Position, long Size)
{
byte[] Data = new byte[Size];
for (long Offs = 0; Offs < Size; Offs++)
{
Data[Offs] = (byte)Memory.ReadByte(Position + Offs);
}
return Data;
}
public static void WriteBytes(AMemory Memory, long Position, byte[] Data)
{
for (int Offs = 0; Offs < Data.Length; Offs++)