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/CmpFileDlg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Stars45/CmpFileDlg.cpp') diff --git a/Stars45/CmpFileDlg.cpp b/Stars45/CmpFileDlg.cpp index d75e3dd..b0086c1 100644 --- a/Stars45/CmpFileDlg.cpp +++ b/Stars45/CmpFileDlg.cpp @@ -114,10 +114,10 @@ CmpFileDlg::Show() FormatDay(day, campaign->GetTime()); - sprintf(save_name, "%s %s (%s)", - op_name, - day, - group->GetRegion().data()); + sprintf_s(save_name, "%s %s (%s)", + op_name, + day, + group->GetRegion().data()); } edt_name->SetText(save_name); @@ -155,7 +155,7 @@ CmpFileDlg::OnSave(AWEvent* event) CampaignSaveGame save(campaign); char filename[256]; - strcpy(filename, edt_name->GetText()); + strcpy_s(filename, edt_name->GetText()); char* newline = strchr(filename, '\n'); if (newline) *newline = 0; -- cgit v1.1