From 8823bab3f3c2c32f0b8b7d0206c8a867faf41116 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. --HG-- extra : rebase_source : 9dc894bfde14718cb96833f6076fae4261f06f5a --- core/NextMap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/NextMap.cpp b/core/NextMap.cpp index 5bfc3f12..70c4733b 100644 --- a/core/NextMap.cpp +++ b/core/NextMap.cpp @@ -184,14 +184,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;