diff options
author | Subv <subv2112@gmail.com> | 2018-01-07 15:57:41 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-07 23:11:56 +0100 |
commit | 5f41477f9cadfa072150917d5a725904ece0771e (patch) | |
tree | c391d31cac8d452de9c54a3ab4b661bc257c7b80 | |
parent | IPC: Fixed pushing ResultCodes into the command buffer. (diff) | |
download | yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar.gz yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar.bz2 yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar.lz yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar.xz yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar.zst yuzu-5f41477f9cadfa072150917d5a725904ece0771e.zip |
-rw-r--r-- | src/core/hle/service/sm/sm.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index 509945136..6bfd6c50e 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -88,20 +88,12 @@ void SM::Initialize(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_SM, "called"); } -/** - * SM::GetService service function - * Inputs: - * 0: 0x00000001 - * 1: Unknown - * 2: Unknown - * 3-4: 8-byte UTF-8 service name - * Outputs: - * 0: ResultCode - */ void SM::GetService(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; - auto name_buf = rp.PopRaw<std::array<char, 9>>(); - std::string name(name_buf.data()); + auto name_buf = rp.PopRaw<std::array<char, 8>>(); + auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); + + std::string name(name_buf.begin(), end); // TODO(yuriks): Permission checks go here |