diff options
author | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2011-12-09 15:37:22 +0000 |
---|---|---|
committer | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2011-12-09 15:37:22 +0000 |
commit | d489095bcdf9603053ebd514588093a991605ffb (patch) | |
tree | db03ad0a00e1466fef64290adfecd67bc9373d1c /nGenEx/FormDef.cpp | |
parent | 4f272a3e310be77b4ba16fdfd2c9b6735f411037 (diff) | |
download | starshatter-d489095bcdf9603053ebd514588093a991605ffb.zip starshatter-d489095bcdf9603053ebd514588093a991605ffb.tar.gz starshatter-d489095bcdf9603053ebd514588093a991605ffb.tar.bz2 |
More string and fopen safety measures
Diffstat (limited to 'nGenEx/FormDef.cpp')
-rw-r--r-- | nGenEx/FormDef.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nGenEx/FormDef.cpp b/nGenEx/FormDef.cpp index 9cef31f..125fb94 100644 --- a/nGenEx/FormDef.cpp +++ b/nGenEx/FormDef.cpp @@ -565,11 +565,11 @@ static char path_name[64]; void
FormDef::Load(const char* fname)
{
- sprintf(filename, "%s.frm", fname);
+ sprintf_s(filename, "%s.frm", fname);
Print("Loading Form '%s'\n", fname);
- sprintf(path_name, "Screens/");
+ sprintf_s(path_name, "Screens/");
// Load Design File:
DataLoader* loader = DataLoader::GetLoader();
@@ -686,7 +686,7 @@ FormDef::Load(const char* fname) GetDefText(buf, pdef, filename);
if (*buf && !strchr(buf, '.'))
- strcat(buf, ".pcx");
+ strcat_s(buf, ".pcx");
form->SetTexture(buf);
}
@@ -708,11 +708,11 @@ FormDef::Load(const char* fname) DWORD a = DT_LEFT;
if (GetDefText(buf, pdef, filename)) {
- if (!stricmp(buf, "left"))
+ if (!_stricmp(buf, "left"))
a = DT_LEFT;
- else if (!stricmp(buf, "right"))
+ else if (!_stricmp(buf, "right"))
a = DT_RIGHT;
- else if (!stricmp(buf, "center"))
+ else if (!_stricmp(buf, "center"))
a = DT_CENTER;
}
@@ -1052,11 +1052,11 @@ void FormDef::ParseCtrlDef(CtrlDef* ctrl, TermStruct* val) DWORD a = DT_LEFT;
if (GetDefText(buf, pdef, filename)) {
- if (!stricmp(buf, "left"))
+ if (!_stricmp(buf, "left"))
a = DT_LEFT;
- else if (!stricmp(buf, "right"))
+ else if (!_stricmp(buf, "right"))
a = DT_RIGHT;
- else if (!stricmp(buf, "center"))
+ else if (!_stricmp(buf, "center"))
a = DT_CENTER;
}
@@ -1194,11 +1194,11 @@ void FormDef::ParseColumnDef(CtrlDef* ctrl, TermStruct* val) align = DT_LEFT;
if (GetDefText(buf, pdef, filename)) {
- if (!stricmp(buf, "left"))
+ if (!_stricmp(buf, "left"))
align = DT_LEFT;
- else if (!stricmp(buf, "right"))
+ else if (!_stricmp(buf, "right"))
align = DT_RIGHT;
- else if (!stricmp(buf, "center"))
+ else if (!_stricmp(buf, "center"))
align = DT_CENTER;
}
|