This commit is contained in:
Marc-Éric Martel 2023-10-26 10:42:24 -04:00
parent f5a1906877
commit 8870550512

View File

@ -159,8 +159,8 @@ int Server::Ready() {
} }
} }
} }
delete buf; delete[] buf;
delete strbuf; delete[] strbuf;
return 0; return 0;
} }
@ -224,7 +224,7 @@ void Server::Log(std::string str, bool is_error = false, bool is_fatal = false)
closesocket(m_sock_udp); closesocket(m_sock_udp);
if (m_sock_tcp) if (m_sock_tcp)
closesocket(m_sock_tcp); closesocket(m_sock_tcp);
for (auto& [key, player] : m_players) for (const auto& [key, player] : m_players)
closesocket(player->getSock()); closesocket(player->getSock());
m_players.clear(); m_players.clear();
#ifdef _WIN32 #ifdef _WIN32