Use legal printf format strings when logging.
This commit is contained in:
+1
-1
@@ -807,7 +807,7 @@ Dialog::Result LuaHelpers::ReportScriptError(RString const& Error, RString Error
|
|||||||
ScriptErrorMessage(Error);
|
ScriptErrorMessage(Error);
|
||||||
InReportScriptError= false;
|
InReportScriptError= false;
|
||||||
}
|
}
|
||||||
LOG->Warn(Error.c_str());
|
LOG->Warn( "%s", Error.c_str());
|
||||||
if(UseAbort)
|
if(UseAbort)
|
||||||
{
|
{
|
||||||
RString with_correct= Error + " Correct this and click Retry, or Cancel to break.";
|
RString with_correct= Error + " Correct this and click Retry, or Cancel to break.";
|
||||||
|
|||||||
@@ -816,12 +816,12 @@ try_element_again:
|
|||||||
goto try_element_again;
|
goto try_element_again;
|
||||||
case Dialog::ignore:
|
case Dialog::ignore:
|
||||||
{
|
{
|
||||||
RString error= sCategory + '/' + sFileName +
|
RString element = sCategory + '/' + sFileName;
|
||||||
" could not be found in \"" +
|
RString error = "could not be found in \"" +
|
||||||
GetThemeDirFromName(m_sCurThemeName).c_str() + "\" or \"" +
|
GetThemeDirFromName(m_sCurThemeName) + "\" or \"" +
|
||||||
GetThemeDirFromName(SpecialFiles::BASE_THEME_NAME).c_str() + "\".";
|
GetThemeDirFromName(SpecialFiles::BASE_THEME_NAME) + "\".";
|
||||||
LOG->UserLog("Theme element", "%s", error.c_str());
|
LOG->UserLog("Theme element", element.c_str(), "%s", error.c_str());
|
||||||
LOG->Warn(error.c_str());
|
LOG->Warn( "%s %s", element.c_str(), error.c_str());
|
||||||
LuaHelpers::ScriptErrorMessage(error);
|
LuaHelpers::ScriptErrorMessage(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user