From fc5d76e6e2f92795537ac44b69da19ec4c48250d Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Tue, 23 Jan 2024 10:24:05 -0600 Subject: service: properly convert buffers to strings --- src/core/hle/service/nvdrv/nvdrv_interface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/nvdrv/nvdrv_interface.cpp') diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.cpp b/src/core/hle/service/nvdrv/nvdrv_interface.cpp index 6e4825313..ffe72f281 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.cpp +++ b/src/core/hle/service/nvdrv/nvdrv_interface.cpp @@ -4,6 +4,7 @@ #include "common/logging/log.h" #include "common/scope_exit.h" +#include "common/string_util.h" #include "core/core.h" #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_process.h" @@ -29,7 +30,7 @@ void NVDRV::Open(HLERequestContext& ctx) { } const auto& buffer = ctx.ReadBuffer(); - const std::string device_name(buffer.begin(), buffer.end()); + const std::string device_name(Common::StringFromBuffer(buffer)); if (device_name == "/dev/nvhost-prof-gpu") { rb.Push(0); -- cgit v1.2.3