mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
audout_u: Use a std::array instead of std::string for holding the audio interface name
Uses a type that doesn't potentially dynamically allocate, and ensures that the name of the interface is properly null-terminated when writing it to the buffer.
This commit is contained in:
parent
d3cfaf95c8
commit
c20cea118b
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include "common/logging/log.h"
|
||||
#include "core/core_timing.h"
|
||||
|
@ -167,7 +168,7 @@ void AudOutU::ListAudioOutsImpl(Kernel::HLERequestContext& ctx) {
|
|||
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
||||
IPC::RequestParser rp{ctx};
|
||||
|
||||
const std::string audio_interface = "AudioInterface";
|
||||
constexpr std::array<char, 15> audio_interface{{"AudioInterface"}};
|
||||
ctx.WriteBuffer(audio_interface);
|
||||
|
||||
IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue