diff options
Diffstat (limited to 'src/heretic/ct_chat.c')
-rw-r--r-- | src/heretic/ct_chat.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/heretic/ct_chat.c b/src/heretic/ct_chat.c index 19c27bb2..80ad8c87 100644 --- a/src/heretic/ct_chat.c +++ b/src/heretic/ct_chat.c @@ -33,6 +33,7 @@ #include "deh_str.h" #include "m_controls.h" +#include "m_misc.h" #include "p_local.h" #include "s_sound.h" #include "v_video.h" @@ -288,14 +289,15 @@ void CT_Ticker(void) CT_AddChar(i, 0); // set the end of message character if (numplayers > 2) { - strncpy(plr_lastmsg[i], DEH_String(CT_FromPlrText[i]), - MESSAGESIZE + 9); - plr_lastmsg[i][MESSAGESIZE + 8] = '\0'; - strcat(plr_lastmsg[i], chat_msg[i]); + M_StringCopy(plr_lastmsg[i], DEH_String(CT_FromPlrText[i]), + sizeof(plr_lastmsg[i])); + M_StringConcat(plr_lastmsg[i], chat_msg[i], + sizeof(plr_lastmsg[i])); } else { - strcpy(plr_lastmsg[i], chat_msg[i]); + M_StringCopy(plr_lastmsg[i], chat_msg[i], + sizeof(plr_lastmsg[i])); } if (i != consoleplayer && (chat_dest[i] == consoleplayer + 1 || chat_dest[i] == CT_PLR_ALL) |