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