summaryrefslogtreecommitdiffhomepage
path: root/Stars45/CmpFileDlg.cpp
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-09 21:12:14 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-09 21:12:14 +0000
commit9a2f3d3377b82b597f00d1d8fb8ee58d141cfb95 (patch)
treeaa4691cd582e1b074d43ba30e930f29b7942885d /Stars45/CmpFileDlg.cpp
parentb2805409566af00bc15639494f5a186fbd2f16e6 (diff)
downloadstarshatter-9a2f3d3377b82b597f00d1d8fb8ee58d141cfb95.zip
starshatter-9a2f3d3377b82b597f00d1d8fb8ee58d141cfb95.tar.gz
starshatter-9a2f3d3377b82b597f00d1d8fb8ee58d141cfb95.tar.bz2
More string safety stuff
Diffstat (limited to 'Stars45/CmpFileDlg.cpp')
-rw-r--r--Stars45/CmpFileDlg.cpp10
1 files changed, 5 insertions, 5 deletions
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;