mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-07-02 14:00:46 -07:00
Remove a bit of unsafety around
This commit is contained in:
@ -59,23 +59,23 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
||||
{
|
||||
return ResultCode.InvalidNrr;
|
||||
}
|
||||
else if (header.NrrSize != nrrSize)
|
||||
else if (header.Size != nrrSize)
|
||||
{
|
||||
return ResultCode.InvalidSize;
|
||||
}
|
||||
|
||||
List<byte[]> hashes = new List<byte[]>();
|
||||
|
||||
for (int i = 0; i < header.HashCount; i++)
|
||||
for (int i = 0; i < header.HashesCount; i++)
|
||||
{
|
||||
byte[] temp = new byte[0x20];
|
||||
byte[] hash = new byte[0x20];
|
||||
|
||||
_owner.CpuMemory.Read(nrrAddress + header.HashOffset + (uint)(i * 0x20), temp);
|
||||
_owner.CpuMemory.Read(nrrAddress + header.HashesOffset + (uint)(i * 0x20), hash);
|
||||
|
||||
hashes.Add(temp);
|
||||
hashes.Add(hash);
|
||||
}
|
||||
|
||||
nrrInfo = new NrrInfo((ulong)nrrAddress, header, hashes);
|
||||
nrrInfo = new NrrInfo(nrrAddress, header, hashes);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
Reference in New Issue
Block a user