mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-28 05:26:02 +00:00
SvcSetHeapSize: match kernel check for invalid size (#374)
This fix games like DK Country
This commit is contained in:
parent
afc44850be
commit
b08d889f95
1 changed files with 3 additions and 3 deletions
|
@ -9,9 +9,9 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{
|
||||
private void SvcSetHeapSize(AThreadState ThreadState)
|
||||
{
|
||||
long Size = (long)ThreadState.X1;
|
||||
ulong Size = ThreadState.X1;
|
||||
|
||||
if ((Size & 0x1fffff) != 0 || Size != (uint)Size)
|
||||
if ((Size & 0xFFFFFFFE001FFFFF) != 0)
|
||||
{
|
||||
Device.Log.PrintWarning(LogClass.KernelSvc, $"Heap size 0x{Size:x16} is not aligned!");
|
||||
|
||||
|
@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return;
|
||||
}
|
||||
|
||||
long Result = Process.MemoryManager.TrySetHeapSize(Size, out long Position);
|
||||
long Result = Process.MemoryManager.TrySetHeapSize((long)Size, out long Position);
|
||||
|
||||
ThreadState.X0 = (ulong)Result;
|
||||
|
||||
|
|
Loading…
Reference in a new issue