diff --git a/Source/dvlnet/tcp_client.cpp b/Source/dvlnet/tcp_client.cpp index 5bf460e59..d3a4e12da 100644 --- a/Source/dvlnet/tcp_client.cpp +++ b/Source/dvlnet/tcp_client.cpp @@ -54,7 +54,8 @@ int tcp_client::join(std::string addrstr) = pktfty->make_packet( PLR_BROADCAST, PLR_MASTER, cookie_self, game_init_info); if (!pkt.has_value()) { - SDL_SetError("make_packet: %s", pkt.error().what()); + const std::string_view message = pkt.error().what(); + SDL_SetError("make_packet: %.*s\n", static_cast(message.size()), message.data()); return -1; } send(**pkt);