Fixed printf issue

This commit is contained in:
mathusummut 2018-09-02 13:37:05 +02:00
parent 1b3ae14659
commit 3646557a9f
2 changed files with 5 additions and 5 deletions

View File

@ -590,7 +590,7 @@ namespace
unit->getFullName(false).c_str(),
unit->getDesc(false).c_str(),
unit->getFaction()->getIndex());
printf(szBuf);
printf("%s", szBuf);
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).
enabled)
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n",
@ -678,7 +678,7 @@ namespace
unit->getFullName(false).c_str(),
unit->getDesc(false).c_str(),
unit->getFaction()->getIndex());
printf(szBuf);
printf("%s", szBuf);
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).
enabled)
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n",
@ -765,7 +765,7 @@ namespace
unit->getFullName(false).c_str(),
unit->getDesc(false).c_str(),
unit->getFaction()->getIndex());
printf(szBuf);
printf("%s", szBuf);
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).
enabled)
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n",
@ -854,7 +854,7 @@ namespace
unit->getFullName(false).c_str(),
unit->getDesc(false).c_str(),
unit->getFaction()->getIndex());
printf(szBuf);
printf("%s", szBuf);
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).
enabled)
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n",

View File

@ -1161,7 +1161,7 @@ namespace Glest {
builtUnit->create();
if (builtUnitType->hasSkillClass(scBeBuilt) == false) {
printf((string("Unit [") + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "].").c_str());
printf("%s", (string("Unit [") + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "].").c_str());
//throw megaglest_runtime_error("Unit [" + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "].");
return;
}