From 2c243df101c013cc38bc59076fbb0f282de833eb Mon Sep 17 00:00:00 2001 From: Zegeri Date: Mon, 24 Sep 2018 17:31:39 +0200 Subject: [PATCH] Do not use shared_str directly on printf --- src/xrGame/GameObject.cpp | 2 +- src/xrGame/ini_table_loader.h | 2 +- src/xrGame/ui/UIInvUpgradeProperty.cpp | 2 +- src/xrGame/ui/UITalkWnd.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xrGame/GameObject.cpp b/src/xrGame/GameObject.cpp index 1e746cbd54a..ef2586b2463 100644 --- a/src/xrGame/GameObject.cpp +++ b/src/xrGame/GameObject.cpp @@ -465,7 +465,7 @@ BOOL CGameObject::net_Spawn(CSE_Abstract* DC) //R_ASSERT(Level().Objects.net_Find(E->ID) == nullptr); if (Level().Objects.net_Find(E->ID) != nullptr) { - GEnv.ScriptEngine->script_log(LuaMessageType::Error, "CGameObject:net_Spawn() | Level().Objects.net_Find(E->ID) != nullptr (This mean object already exist on level by this ID) ID=%s s_name=%s", E->ID, E->s_name); + GEnv.ScriptEngine->script_log(LuaMessageType::Error, "CGameObject:net_Spawn() | Level().Objects.net_Find(E->ID) != nullptr (This mean object already exist on level by this ID) ID=%s s_name=%s", E->ID, E->s_name.c_str()); return false; } } diff --git a/src/xrGame/ini_table_loader.h b/src/xrGame/ini_table_loader.h index 09152d7ffa2..f21014a4718 100644 --- a/src/xrGame/ini_table_loader.h +++ b/src/xrGame/ini_table_loader.h @@ -106,7 +106,7 @@ typename CSIni_Table::ITEM_TABLE& CSIni_Table::table() T_INI_LOADER::IdToIndex((*i).first, type_max); if (type_max == cur_index) - xrDebug::Fatal(DEBUG_INFO, "wrong community %s in section [%s]", (*i).first, table_sect); + xrDebug::Fatal(DEBUG_INFO, "wrong community %s in section [%s]", (*i).first.c_str(), table_sect); (*m_pTable)[cur_index].resize(cur_table_width); for (std::size_t j = 0; j < cur_table_width; j++) diff --git a/src/xrGame/ui/UIInvUpgradeProperty.cpp b/src/xrGame/ui/UIInvUpgradeProperty.cpp index f8367c15567..fad17914743 100644 --- a/src/xrGame/ui/UIInvUpgradeProperty.cpp +++ b/src/xrGame/ui/UIInvUpgradeProperty.cpp @@ -175,7 +175,7 @@ void UIInvUpgPropertiesWnd::init_from_xml(LPCSTR xml_name) property_id._set((*ib).first); if (!ui_property->init_property(property_id)) { - Msg("! Invalid property <%s> in inventory upgrade manager!", property_id); + Msg("! Invalid property <%s> in inventory upgrade manager!", property_id.c_str()); continue; } diff --git a/src/xrGame/ui/UITalkWnd.cpp b/src/xrGame/ui/UITalkWnd.cpp index 6bae4f162af..443c24459be 100644 --- a/src/xrGame/ui/UITalkWnd.cpp +++ b/src/xrGame/ui/UITalkWnd.cpp @@ -261,7 +261,7 @@ void CUITalkWnd::AskQuestion() { string128 s; xr_sprintf(s, "ID = [%s] of selected question is out of range of available dialogs ", - UITalkDialogWnd->m_ClickedQuestionID); + UITalkDialogWnd->m_ClickedQuestionID.c_str()); VERIFY2(FALSE, s); }