Fix GetWritableRegion write-back (#2456)
This commit is contained in:
parent
59900d7f00
commit
b1a9d17cf8
2 changed files with 4 additions and 2 deletions
|
@ -66,7 +66,9 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
int copySize = (int)Math.Min(MaxChunkSize, size - subOffset);
|
||||
|
||||
GetWritableRegion(va + subOffset, copySize).Memory.Span.Fill(0);
|
||||
using var writableRegion = GetWritableRegion(va + subOffset, copySize);
|
||||
|
||||
writableRegion.Memory.Span.Fill(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ namespace Ryujinx.Memory
|
|||
/// <exception cref="InvalidMemoryRegionException">Throw when either <paramref name="offset"/> or <paramref name="size"/> are out of range</exception>
|
||||
public WritableRegion GetWritableRegion(ulong offset, int size)
|
||||
{
|
||||
return new WritableRegion(this, offset, GetMemory(offset, size));
|
||||
return new WritableRegion(null, offset, GetMemory(offset, size));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue