diff options
| author | 2018-01-07 09:57:41 -0500 | |
|---|---|---|
| committer | 2018-01-07 17:11:56 -0500 | |
| commit | 5f41477f9cadfa072150917d5a725904ece0771e (patch) | |
| tree | c391d31cac8d452de9c54a3ab4b661bc257c7b80 /src | |
| parent | IPC: Fixed pushing ResultCodes into the command buffer. (diff) | |
| download | yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar.gz yuzu-5f41477f9cadfa072150917d5a725904ece0771e.tar.xz yuzu-5f41477f9cadfa072150917d5a725904ece0771e.zip | |
SM: Fixed connecting to services with an 8-byte name, like appletOE.
Diffstat (limited to 'src')
| -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) { | |||
| 88 | LOG_DEBUG(Service_SM, "called"); | 88 | LOG_DEBUG(Service_SM, "called"); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | /** | ||
| 92 | * SM::GetService service function | ||
| 93 | * Inputs: | ||
| 94 | * 0: 0x00000001 | ||
| 95 | * 1: Unknown | ||
| 96 | * 2: Unknown | ||
| 97 | * 3-4: 8-byte UTF-8 service name | ||
| 98 | * Outputs: | ||
| 99 | * 0: ResultCode | ||
| 100 | */ | ||
| 101 | void SM::GetService(Kernel::HLERequestContext& ctx) { | 91 | void SM::GetService(Kernel::HLERequestContext& ctx) { |
| 102 | IPC::RequestParser rp{ctx}; | 92 | IPC::RequestParser rp{ctx}; |
| 103 | auto name_buf = rp.PopRaw<std::array<char, 9>>(); | 93 | auto name_buf = rp.PopRaw<std::array<char, 8>>(); |
| 104 | std::string name(name_buf.data()); | 94 | auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); |
| 95 | |||
| 96 | std::string name(name_buf.begin(), end); | ||
| 105 | 97 | ||
| 106 | // TODO(yuriks): Permission checks go here | 98 | // TODO(yuriks): Permission checks go here |
| 107 | 99 | ||