mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-24 15:37:10 +02:00
ReadBytes function in AMemory, with cleaner range check. (#136)
This commit is contained in:
parent
39ebb83453
commit
6fe51f9705
12 changed files with 46 additions and 47 deletions
|
@ -75,7 +75,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
long Position = Context.Request.SendBuff[0].Position;
|
||||
long Size = Context.Request.SendBuff[0].Size;
|
||||
|
||||
byte[] DeviceNameBuffer = AMemoryHelper.ReadBytes(Context.Memory, Position, Size);
|
||||
byte[] DeviceNameBuffer = Context.Memory.ReadBytes(Position, Size);
|
||||
|
||||
string DeviceName = Encoding.ASCII.GetString(DeviceNameBuffer);
|
||||
|
||||
|
@ -160,7 +160,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
|
||||
(long Position, long Size) = Context.Request.GetBufferType0x21();
|
||||
|
||||
byte[] DeviceNameBuffer = AMemoryHelper.ReadBytes(Context.Memory, Position, Size);
|
||||
byte[] DeviceNameBuffer = Context.Memory.ReadBytes(Position, Size);
|
||||
|
||||
string DeviceName = Encoding.UTF8.GetString(DeviceNameBuffer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue