From 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:23:44 +1000 Subject: The Formatting String Catastrophe --- source/core/StarUdp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/core/StarUdp.cpp') diff --git a/source/core/StarUdp.cpp b/source/core/StarUdp.cpp index 9ff7b48..c38da41 100644 --- a/source/core/StarUdp.cpp +++ b/source/core/StarUdp.cpp @@ -23,7 +23,7 @@ size_t UdpSocket::receive(HostAddressWithPort* address, char* data, size_t datas else if (netErrorInterrupt()) len = 0; else - throw NetworkException(strf("udp recv error: %s", netErrorString())); + throw NetworkException(strf("udp recv error: {}", netErrorString())); } if (address) @@ -47,7 +47,7 @@ size_t UdpSocket::send(HostAddressWithPort const& address, char const* data, siz else if (netErrorInterrupt()) len = 0; else - throw NetworkException(strf("udp send error: %s", netErrorString())); + throw NetworkException(strf("udp send error: {}", netErrorString())); } return len; @@ -57,7 +57,7 @@ UdpServer::UdpServer(HostAddressWithPort const& address) : m_hostAddress(address), m_listenSocket(make_shared(m_hostAddress.address().mode())) { m_listenSocket->setNonBlocking(true); m_listenSocket->bind(m_hostAddress); - Logger::debug("UdpServer listening on: %s", m_hostAddress); + Logger::debug("UdpServer listening on: {}", m_hostAddress); } UdpServer::~UdpServer() { -- cgit v1.2.3