summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_port.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-03-24 00:58:48 +0100
committerLiam <byteslice@airmail.cc>2023-03-24 01:28:47 +0100
commit41d99aa89db7ee483112e49baa6c86e14adbd168 (patch)
tree085ba1f2eb6a75c2b93d70834cc20d4b14f4d10f /src/core/hle/kernel/svc/svc_port.cpp
parentMerge pull request #9971 from Morph1984/q (diff)
downloadyuzu-41d99aa89db7ee483112e49baa6c86e14adbd168.tar
yuzu-41d99aa89db7ee483112e49baa6c86e14adbd168.tar.gz
yuzu-41d99aa89db7ee483112e49baa6c86e14adbd168.tar.bz2
yuzu-41d99aa89db7ee483112e49baa6c86e14adbd168.tar.lz
yuzu-41d99aa89db7ee483112e49baa6c86e14adbd168.tar.xz
yuzu-41d99aa89db7ee483112e49baa6c86e14adbd168.tar.zst
yuzu-41d99aa89db7ee483112e49baa6c86e14adbd168.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc/svc_port.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc/svc_port.cpp b/src/core/hle/kernel/svc/svc_port.cpp
index c6eb70422..abba757c7 100644
--- a/src/core/hle/kernel/svc/svc_port.cpp
+++ b/src/core/hle/kernel/svc/svc_port.cpp
@@ -14,7 +14,8 @@ namespace Kernel::Svc {
Result ConnectToNamedPort(Core::System& system, Handle* out, u64 user_name) {
// Copy the provided name from user memory to kernel memory.
- auto string_name = system.Memory().ReadCString(user_name, KObjectName::NameLengthMax);
+ auto string_name =
+ GetCurrentMemory(system.Kernel()).ReadCString(user_name, KObjectName::NameLengthMax);
std::array<char, KObjectName::NameLengthMax> name{};
std::strncpy(name.data(), string_name.c_str(), KObjectName::NameLengthMax - 1);
@@ -62,7 +63,8 @@ Result ConnectToPort(Core::System& system, Handle* out_handle, Handle port) {
Result ManageNamedPort(Core::System& system, Handle* out_server_handle, uint64_t user_name,
int32_t max_sessions) {
// Copy the provided name from user memory to kernel memory.
- auto string_name = system.Memory().ReadCString(user_name, KObjectName::NameLengthMax);
+ auto string_name =
+ GetCurrentMemory(system.Kernel()).ReadCString(user_name, KObjectName::NameLengthMax);
// Copy the provided name from user memory to kernel memory.
std::array<char, KObjectName::NameLengthMax> name{};