summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-26 21:48:19 +0100
committerLioncash <mathew1800@gmail.com>2019-11-27 03:55:38 +0100
commitb2165c6b353be5e8117d1f9bc677bb198fa9d8cd (patch)
tree1b08113cf73a864c7c3e74cd4a3e1cca53879ce2 /src/core/hle/kernel/svc.cpp
parentcore/memory: Migrate over GetPointer() (diff)
downloadyuzu-b2165c6b353be5e8117d1f9bc677bb198fa9d8cd.tar
yuzu-b2165c6b353be5e8117d1f9bc677bb198fa9d8cd.tar.gz
yuzu-b2165c6b353be5e8117d1f9bc677bb198fa9d8cd.tar.bz2
yuzu-b2165c6b353be5e8117d1f9bc677bb198fa9d8cd.tar.lz
yuzu-b2165c6b353be5e8117d1f9bc677bb198fa9d8cd.tar.xz
yuzu-b2165c6b353be5e8117d1f9bc677bb198fa9d8cd.tar.zst
yuzu-b2165c6b353be5e8117d1f9bc677bb198fa9d8cd.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 68bff11ec..738db528d 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -332,7 +332,9 @@ static ResultCode UnmapMemory(Core::System& system, VAddr dst_addr, VAddr src_ad
/// Connect to an OS service given the port name, returns the handle to the port to out
static ResultCode ConnectToNamedPort(Core::System& system, Handle* out_handle,
VAddr port_name_address) {
- if (!system.Memory().IsValidVirtualAddress(port_name_address)) {
+ auto& memory = system.Memory();
+
+ if (!memory.IsValidVirtualAddress(port_name_address)) {
LOG_ERROR(Kernel_SVC,
"Port Name Address is not a valid virtual address, port_name_address=0x{:016X}",
port_name_address);
@@ -341,7 +343,7 @@ static ResultCode ConnectToNamedPort(Core::System& system, Handle* out_handle,
static constexpr std::size_t PortNameMaxLength = 11;
// Read 1 char beyond the max allowed port name to detect names that are too long.
- std::string port_name = Memory::ReadCString(port_name_address, PortNameMaxLength + 1);
+ const std::string port_name = memory.ReadCString(port_name_address, PortNameMaxLength + 1);
if (port_name.size() > PortNameMaxLength) {
LOG_ERROR(Kernel_SVC, "Port name is too long, expected {} but got {}", PortNameMaxLength,
port_name.size());