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/RadioView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Stars45/RadioView.cpp') diff --git a/Stars45/RadioView.cpp b/Stars45/RadioView.cpp index 649db2f..ee757ef 100644 --- a/Stars45/RadioView.cpp +++ b/Stars45/RadioView.cpp @@ -565,14 +565,14 @@ RadioView::GetRadioMenu(Ship* s) if (ship->GetIFF() == elem->GetIFF() && ship->GetElement() != elem.value()) { if (n >= page_offset && n < page_offset+PAGE_SIZE) { char text[64]; - sprintf(text, "%d. %s", n+1 - page_offset, (const char*) elem->Name()); + sprintf_s(text, "%d. %s", n+1 - page_offset, (const char*) elem->Name()); if (elem->IsActive()) { starship_menu->AddMenu(text, elem_menu, (DWORD) elem.value()); } else { - strcat(text, " "); - strcat(text, Game::GetText("RadioView.item.not-avail").data()); + strcat_s(text, " "); + strcat_s(text, Game::GetText("RadioView.item.not-avail").data()); starship_menu->AddItem(text, 0, false); } } @@ -582,7 +582,7 @@ RadioView::GetRadioMenu(Ship* s) if (num_pages > 1) { char text[64]; - sprintf(text, Game::GetText("RadioView.item.next-page").data(), starship_page + 1, num_pages); + sprintf_s(text, Game::GetText("RadioView.item.next-page").data(), starship_page + 1, num_pages); starship_menu->AddItem(text); } -- cgit v1.1