Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev 2025-05-30 17:08:34 -05:00 committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View file

@ -94,15 +94,15 @@ namespace Ryujinx.HLE.Loaders.Mods
static int ParseHexByte(byte c)
{
if (c >= '0' && c <= '9')
if (c is >= (byte)'0' and <= (byte)'9')
{
return c - '0';
}
else if (c >= 'A' && c <= 'F')
else if (c is >= (byte)'A' and <= (byte)'F')
{
return c - 'A' + 10;
}
else if (c >= 'a' && c <= 'f')
else if (c is >= (byte)'a' and <= (byte)'f')
{
return c - 'a' + 10;
}

View file

@ -76,7 +76,7 @@ namespace Ryujinx.HLE.Loaders.Mods
Logger.Warning?.Print(LogClass.ModLoader, $"Attempted to patch protected memory ({patchOffset:x} is within protected boundary of {protectedOffset:x}).");
continue;
}
if (patchOffset > memory.Length)
{
Logger.Warning?.Print(LogClass.ModLoader, $"Attempted to patch out of bounds memory (offset {patchOffset} ({patchOffset:x}) exceeds memory buffer length {memory.Length}).");