1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

vm: Fix vm::page_protect error checking

This commit is contained in:
Eladash 2021-08-24 17:43:06 +03:00 committed by kd-11
parent 57b9acec62
commit 4e139ee080

View File

@ -784,12 +784,9 @@ namespace vm
flags_set &= ~flags_both; flags_set &= ~flags_both;
flags_clear &= ~flags_both; flags_clear &= ~flags_both;
for (u32 i = addr / 4096; i < addr / 4096 + size / 4096; i++) if (!check_addr(addr, flags_test, size))
{ {
if ((g_pages[i] & flags_test) != (flags_test | page_allocated)) return false;
{
return false;
}
} }
if (!flags_set && !flags_clear) if (!flags_set && !flags_clear)