Fix not assigning write access to WriteCombine pages on restore.

This commit is contained in:
Dr. Chat 2015-12-07 10:53:45 -06:00 committed by Ben Vanik
parent 1442f50058
commit 9ed81b6876
1 changed files with 2 additions and 1 deletions

View File

@ -586,7 +586,8 @@ bool BaseHeap::Restore(ByteStream* stream) {
} }
memory::PageAccess page_access = memory::PageAccess::kNoAccess; memory::PageAccess page_access = memory::PageAccess::kNoAccess;
if (page.current_protect == (kMemoryProtectRead | kMemoryProtectWrite)) { if ((page.current_protect & kMemoryProtectRead) &&
(page.current_protect & kMemoryProtectWrite)) {
page_access = memory::PageAccess::kReadWrite; page_access = memory::PageAccess::kReadWrite;
} else if (page.current_protect & kMemoryProtectRead) { } else if (page.current_protect & kMemoryProtectRead) {
page_access = memory::PageAccess::kReadOnly; page_access = memory::PageAccess::kReadOnly;