Fix some format string misuse with map names.

--HG--
extra : rebase_source : 9dc894bfde14718cb96833f6076fae4261f06f5a
This commit is contained in:
Nicholas Hastings 2013-09-13 13:47:55 -04:00
parent b9d5b59bd1
commit 8823bab3f3

View File

@ -184,14 +184,14 @@ void NextMapManager::OnSourceModLevelChange( const char *mapName )
m_tempChangeInfo.m_mapName[0] ='\0'; m_tempChangeInfo.m_mapName[0] ='\0';
m_tempChangeInfo.m_changeReason[0] = '\0'; m_tempChangeInfo.m_changeReason[0] = '\0';
m_tempChangeInfo.startTime = time(NULL); m_tempChangeInfo.startTime = time(NULL);
UTIL_Format(lastMap, sizeof(lastMap), mapName); UTIL_Format(lastMap, sizeof(lastMap), "%s", mapName);
} }
void NextMapManager::ForceChangeLevel( const char *mapName, const char* changeReason ) void NextMapManager::ForceChangeLevel( const char *mapName, const char* changeReason )
{ {
/* Store the mapname and reason */ /* Store the mapname and reason */
UTIL_Format(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), mapName); UTIL_Format(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), "%s", mapName);
UTIL_Format(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), changeReason); UTIL_Format(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), "%s", changeReason);
/* Change level and skip our hook */ /* Change level and skip our hook */
g_forcedChange = true; g_forcedChange = true;