diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-23 19:31:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 19:31:27 +0100 |
commit | ba518f68994783f00d0dd1c1936b1a20465f6186 (patch) | |
tree | 7c2daff138094add6ca580d15e67bb9f9745b0fc /src/core/hle/service/vi/vi.cpp | |
parent | Merge pull request #12753 from liamwhite/why (diff) | |
parent | service: properly convert buffers to strings (diff) | |
download | yuzu-ba518f68994783f00d0dd1c1936b1a20465f6186.tar yuzu-ba518f68994783f00d0dd1c1936b1a20465f6186.tar.gz yuzu-ba518f68994783f00d0dd1c1936b1a20465f6186.tar.bz2 yuzu-ba518f68994783f00d0dd1c1936b1a20465f6186.tar.lz yuzu-ba518f68994783f00d0dd1c1936b1a20465f6186.tar.xz yuzu-ba518f68994783f00d0dd1c1936b1a20465f6186.tar.zst yuzu-ba518f68994783f00d0dd1c1936b1a20465f6186.zip |
Diffstat (limited to 'src/core/hle/service/vi/vi.cpp')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index bfcc27ddc..1f3d82c57 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -15,6 +15,7 @@ #include "common/logging/log.h" #include "common/math_util.h" #include "common/settings.h" +#include "common/string_util.h" #include "common/swap.h" #include "core/core_timing.h" #include "core/hle/kernel/k_readable_event.h" @@ -694,9 +695,7 @@ private: void OpenLayer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); - const auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); - - const std::string display_name(name_buf.begin(), end); + const std::string display_name(Common::StringFromBuffer(name_buf)); const u64 layer_id = rp.Pop<u64>(); const u64 aruid = rp.Pop<u64>(); |