mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-22 14:31:39 +00:00
Merge pull request #429 from polybiusproxy/memory-vq
core/memory: Fix error on virtual queries of reserved regions
This commit is contained in:
commit
533c1029c0
|
@ -273,10 +273,10 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags,
|
||||||
std::scoped_lock lk{mutex};
|
std::scoped_lock lk{mutex};
|
||||||
|
|
||||||
auto it = FindVMA(addr);
|
auto it = FindVMA(addr);
|
||||||
if (!it->second.IsMapped() && flags == 1) {
|
if (it->second.type == VMAType::Free && flags == 1) {
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
if (!it->second.IsMapped()) {
|
if (it->second.type == VMAType::Free) {
|
||||||
LOG_WARNING(Kernel_Vmm, "VirtualQuery on free memory region");
|
LOG_WARNING(Kernel_Vmm, "VirtualQuery on free memory region");
|
||||||
return ORBIS_KERNEL_ERROR_EACCES;
|
return ORBIS_KERNEL_ERROR_EACCES;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue