diff --git a/src/common/events.h b/src/common/events.h index f43731d3..f51a72cc 100644 --- a/src/common/events.h +++ b/src/common/events.h @@ -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 // initialize it with a single null to prevent it from being read as some // arbitrary C-style string. - std::array string_buffer{0}; + std::array string_buffer; + string_buffer[0] = 0; void* data = std::visit( overload{ [&](const std::nullptr_t&) -> void* { return nullptr; },