From 9a2f3d3377b82b597f00d1d8fb8ee58d141cfb95 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 21:12:14 +0000 Subject: More string safety stuff --- Stars45/CombatUnit.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Stars45/CombatUnit.cpp') diff --git a/Stars45/CombatUnit.cpp b/Stars45/CombatUnit.cpp index ed65f4c..951cb87 100644 --- a/Stars45/CombatUnit.cpp +++ b/Stars45/CombatUnit.cpp @@ -89,22 +89,22 @@ CombatUnit::GetDescription() const static char desc[256]; if (!design) { - strcpy(desc, Game::GetText("[unknown]").data()); + strcpy_s(desc, Game::GetText("[unknown]").data()); } else if (count > 1) { - sprintf(desc, "%dx %s %s", LiveCount(), design->abrv, design->DisplayName()); + sprintf_s(desc, "%dx %s %s", LiveCount(), design->abrv, design->DisplayName()); } else { if (regnum.length() > 0) - sprintf(desc, "%s-%s %s", design->abrv, (const char*) regnum, (const char*) name); + sprintf_s(desc, "%s-%s %s", design->abrv, (const char*) regnum, (const char*) name); else - sprintf(desc, "%s %s", design->abrv, (const char*) name); + sprintf_s(desc, "%s %s", design->abrv, (const char*) name); if (dead_count > 0) { - strcat(desc, " "); - strcat(desc, Game::GetText("killed.in.action")); + strcat_s(desc, " "); + strcat_s(desc, Game::GetText("killed.in.action")); } } -- cgit v1.1