mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Actually only initialize the first value
This commit is contained in:
+2
-1
@@ -199,7 +199,8 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket,
|
|||||||
// This buffer is used to write strings and small objects to. We'll
|
// This buffer is used to write strings and small objects to. We'll
|
||||||
// initialize it with a single null to prevent it from being read as some
|
// initialize it with a single null to prevent it from being read as some
|
||||||
// arbitrary C-style string.
|
// arbitrary C-style string.
|
||||||
std::array<char, max_string_length> string_buffer{0};
|
std::array<char, max_string_length> string_buffer;
|
||||||
|
string_buffer[0] = 0;
|
||||||
void* data = std::visit(
|
void* data = std::visit(
|
||||||
overload{
|
overload{
|
||||||
[&](const std::nullptr_t&) -> void* { return nullptr; },
|
[&](const std::nullptr_t&) -> void* { return nullptr; },
|
||||||
|
|||||||
Reference in New Issue
Block a user