Kernel.Vmm: Fix protection check for file mappings (#4388)

This commit is contained in:
Stephen Miller authored and GitHub committed 2026-05-09 16:09:51 -07:00
1 parent 05ccc586ff
commit d3597c7f18
1 file changed
+1 -1
+1 -1
View File
@@ -702,7 +702,7 @@ s32 MemoryManager::MapFile(void** out_addr, VAddr virtual_addr, u64 size, Memory
handle = file->f.GetFileMapping();
if (False(file->f.GetAccessMode() & Common::FS::FileAccessMode::Write) ||
if (False(file->f.GetAccessMode() & Common::FS::FileAccessMode::Write) &&
False(file->f.GetAccessMode() & Common::FS::FileAccessMode::Append)) {
// If the file does not have write access, ensure prot does not contain write
// permissions. On real hardware, these mappings succeed, but the memory cannot be