diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-07-10 16:50:10 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-10 21:50:10 +0200 |
| commit | b1a9d17cf85ab8322aeb700ad28d58f0edf63d08 (patch) | |
| tree | 4cdbb4d729deea6f04f2e807fc588aff3b036128 /Ryujinx.Memory/IVirtualMemoryManager.cs | |
| parent | 59900d7f00b14681acfc7ef5e8d1e18d53664e1c (diff) | |
Fix GetWritableRegion write-back (#2456)
Diffstat (limited to 'Ryujinx.Memory/IVirtualMemoryManager.cs')
| -rw-r--r-- | Ryujinx.Memory/IVirtualMemoryManager.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Ryujinx.Memory/IVirtualMemoryManager.cs b/Ryujinx.Memory/IVirtualMemoryManager.cs index b5e08019..056940cc 100644 --- a/Ryujinx.Memory/IVirtualMemoryManager.cs +++ b/Ryujinx.Memory/IVirtualMemoryManager.cs @@ -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); } } |
