Use MAX_MAP_NAME constant for setting levelname in ServerBrowser

This commit is contained in:
Kawe Mazidjatari 2022-08-08 00:33:07 +02:00
parent 8328da706a
commit 6cb44740f1

View File

@ -547,7 +547,7 @@ void CBrowser::HostPanel(void)
{
if (!m_Server.m_svMapName.empty())
{
strncpy_s(g_pHostState->m_levelName, m_Server.m_svMapName.c_str(), 64); // Copy new map into hoststate levelname. 64 is size of m_levelname.
strncpy_s(g_pHostState->m_levelName, m_Server.m_svMapName.c_str(), MAX_MAP_NAME); // Copy new map into hoststate levelname.
g_pHostState->m_iNextState = HostStates_t::HS_CHANGE_LEVEL_MP; // Force CHostState::FrameUpdate to change the level.
}
else