From d808d6d8a516a24d49cd3f3e9e704ecf8536fa65 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Fri, 13 Sep 2013 13:47:55 -0400 Subject: [PATCH] Fix some format string misuse with map names. --- core/NextMap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/NextMap.cpp b/core/NextMap.cpp index a95a40626..922430087 100644 --- a/core/NextMap.cpp +++ b/core/NextMap.cpp @@ -186,14 +186,14 @@ void NextMapManager::OnSourceModLevelChange( const char *mapName ) m_tempChangeInfo.m_mapName[0] ='\0'; m_tempChangeInfo.m_changeReason[0] = '\0'; 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 ) { /* Store the mapname and reason */ - UTIL_Format(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), mapName); - UTIL_Format(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), changeReason); + UTIL_Format(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), "%s", mapName); + UTIL_Format(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), "%s", changeReason); /* Change level and skip our hook */ g_forcedChange = true;