enabling warn format security and some fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -824,9 +824,7 @@ void CLevelSystem::LogLoadingTime()
|
||||
sChain = " (Chained)";
|
||||
}
|
||||
|
||||
AZStd::string text;
|
||||
text.format("Game Level Load Time: [%s] Level %s loaded in %.2f seconds%s", vers, m_lastLevelName.c_str(), m_fLastLevelLoadTime, sChain);
|
||||
gEnv->pLog->Log(text.c_str());
|
||||
gEnv->pLog->Log("Game Level Load Time: [%s] Level %s loaded in %.2f seconds%s", vers, m_lastLevelName.c_str(), m_fLastLevelLoadTime, sChain);
|
||||
}
|
||||
|
||||
void CLevelSystem::GetMemoryUsage(ICrySizer* pSizer) const
|
||||
|
||||
@@ -468,10 +468,7 @@ namespace LegacyLevelSystem
|
||||
sChain = " (Chained)";
|
||||
}
|
||||
|
||||
AZStd::string text;
|
||||
text.format(
|
||||
"Game Level Load Time: [%s] Level %s loaded in %.2f seconds%s", vers, m_lastLevelName.c_str(), m_fLastLevelLoadTime, sChain);
|
||||
gEnv->pLog->Log(text.c_str());
|
||||
gEnv->pLog->Log("Game Level Load Time: [%s] Level %s loaded in %.2f seconds%s", vers, m_lastLevelName.c_str(), m_fLastLevelLoadTime, sChain);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -593,11 +593,11 @@ void CLog::LogPlus(const char* szFormat, ...)
|
||||
|
||||
if (bfile)
|
||||
{
|
||||
LogToFilePlus(szTemp);
|
||||
LogToFilePlus("%s", szTemp);
|
||||
}
|
||||
if (bconsole)
|
||||
{
|
||||
LogToConsolePlus(szTemp);
|
||||
LogToConsolePlus("%s", szTemp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ void CSystem::LogVersion()
|
||||
#else
|
||||
strftime(s, 128, "Log Started at %c", today);
|
||||
#endif
|
||||
CryLogAlways(s);
|
||||
CryLogAlways("%s", s);
|
||||
|
||||
CryLogAlways("Built on " __DATE__ " " __TIME__);
|
||||
|
||||
|
||||
@@ -376,12 +376,12 @@ void CXConsole::LogChangeMessage(const char* name, const bool isConst, const boo
|
||||
|
||||
if (allowChange)
|
||||
{
|
||||
gEnv->pLog->LogWarning(logMessage.c_str());
|
||||
gEnv->pLog->LogWarning("%s", logMessage.c_str());
|
||||
gEnv->pLog->LogWarning("Modifying marked variables will not be allowed in Release mode!");
|
||||
}
|
||||
else
|
||||
{
|
||||
gEnv->pLog->LogError(logMessage.c_str());
|
||||
gEnv->pLog->LogError("%s", logMessage.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user