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/NetServerDlg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Stars45/NetServerDlg.cpp') diff --git a/Stars45/NetServerDlg.cpp b/Stars45/NetServerDlg.cpp index adb869c..b1ddb61 100644 --- a/Stars45/NetServerDlg.cpp +++ b/Stars45/NetServerDlg.cpp @@ -94,12 +94,12 @@ NetServerDlg::Show() cmb_type->SetSelection(config->GetGameType()); if (edt_game_port) { - sprintf(buff, "%d", config->GetLobbyPort()); + sprintf_s(buff, "%d", config->GetLobbyPort()); edt_game_port->SetText(buff); } if (edt_admin_port) { - sprintf(buff, "%d", config->GetAdminPort()); + sprintf_s(buff, "%d", config->GetAdminPort()); edt_admin_port->SetText(buff); } @@ -135,14 +135,14 @@ NetServerDlg::OnApply(AWEvent* event) if (edt_game_port) { int port = 0; - sscanf(edt_game_port->GetText(), "%d", &port); + sscanf_s(edt_game_port->GetText(), "%d", &port); config->SetLobbyPort((WORD) port); config->SetGamePort((WORD) port+1); } if (edt_admin_port) { int port = 0; - sscanf(edt_admin_port->GetText(), "%d", &port); + sscanf_s(edt_admin_port->GetText(), "%d", &port); config->SetAdminPort((WORD) port); } -- cgit v1.1