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

View file

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