From effe5843731bce764ed6c5f027f38fbb93f9c436 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 28 Mar 2020 23:09:05 +0100 Subject: [PATCH] Actually only initialize the first value --- src/common/events.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; },