summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_query_memory.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-10-23 03:16:38 +0200
committerLiam <byteslice@airmail.cc>2023-11-10 18:01:35 +0100
commit2a255b2d61a445fb2b83cc8af7632e3d720e1292 (patch)
tree37f5c16ba52339d91e57c5b975639dc1eb60b9f7 /src/core/hle/kernel/svc/svc_query_memory.cpp
parentMerge pull request #11981 from lucasreis1/patch (diff)
downloadyuzu-2a255b2d61a445fb2b83cc8af7632e3d720e1292.tar
yuzu-2a255b2d61a445fb2b83cc8af7632e3d720e1292.tar.gz
yuzu-2a255b2d61a445fb2b83cc8af7632e3d720e1292.tar.bz2
yuzu-2a255b2d61a445fb2b83cc8af7632e3d720e1292.tar.lz
yuzu-2a255b2d61a445fb2b83cc8af7632e3d720e1292.tar.xz
yuzu-2a255b2d61a445fb2b83cc8af7632e3d720e1292.tar.zst
yuzu-2a255b2d61a445fb2b83cc8af7632e3d720e1292.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc/svc_query_memory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc/svc_query_memory.cpp b/src/core/hle/kernel/svc/svc_query_memory.cpp
index 51af06e97..816dcb8d0 100644
--- a/src/core/hle/kernel/svc/svc_query_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_query_memory.cpp
@@ -31,12 +31,12 @@ Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageIn
}
auto& current_memory{GetCurrentMemory(system.Kernel())};
- const auto memory_info{process->GetPageTable().QueryInfo(address).GetSvcMemoryInfo()};
- current_memory.WriteBlock(out_memory_info, std::addressof(memory_info), sizeof(memory_info));
+ KMemoryInfo mem_info;
+ R_TRY(process->GetPageTable().QueryInfo(std::addressof(mem_info), out_page_info, address));
- //! This is supposed to be part of the QueryInfo call.
- *out_page_info = {};
+ const auto svc_mem_info = mem_info.GetSvcMemoryInfo();
+ current_memory.WriteBlock(out_memory_info, std::addressof(svc_mem_info), sizeof(svc_mem_info));
R_SUCCEED();
}