summaryrefslogtreecommitdiff
path: root/src/hexen/s_sound.c
diff options
context:
space:
mode:
authorSimon Howard2014-03-29 21:25:55 -0400
committerSimon Howard2014-03-29 21:25:55 -0400
commit2e6e43c4a706e3670f131c7b2d5a5525f9bf0d7b (patch)
tree5779e2bb137ce8771b1c12f1f3fd234d16d997f6 /src/hexen/s_sound.c
parent5f9b4368a2adad65dcc960a76c45d12059ca7214 (diff)
downloadchocolate-doom-2e6e43c4a706e3670f131c7b2d5a5525f9bf0d7b.tar.gz
chocolate-doom-2e6e43c4a706e3670f131c7b2d5a5525f9bf0d7b.tar.bz2
chocolate-doom-2e6e43c4a706e3670f131c7b2d5a5525f9bf0d7b.zip
heretic: Eliminate use of unsafe string functions.
Eliminate use of strcpy, strcat, strncpy, and use the new safe alternatives.
Diffstat (limited to 'src/hexen/s_sound.c')
-rw-r--r--src/hexen/s_sound.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/hexen/s_sound.c b/src/hexen/s_sound.c
index 3f1a1e76..71944f11 100644
--- a/src/hexen/s_sound.c
+++ b/src/hexen/s_sound.c
@@ -981,11 +981,13 @@ void S_InitScript(void)
SC_MustGetString();
if (*sc_String != '?')
{
- strcpy(S_sfx[i].name, sc_String);
+ M_StringCopy(S_sfx[i].name, sc_String,
+ sizeof(S_sfx[i].name));
}
else
{
- strcpy(S_sfx[i].name, "default");
+ M_StringCopy(S_sfx[i].name, "default",
+ sizeof(S_sfx[i].name));
}
break;
}
@@ -1002,7 +1004,7 @@ void S_InitScript(void)
{
if (!strcmp(S_sfx[i].name, ""))
{
- strcpy(S_sfx[i].name, "default");
+ M_StringCopy(S_sfx[i].name, "default", sizeof(S_sfx[i].name));
}
}
}