From dbbfda0e96037da4f208ff8f00d181a5294484ae Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 22 Jun 2013 22:30:13 -0700 Subject: add new stuff stuff (with tests!), poison memcmp and strncpy --- src/map/tmw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/tmw.cpp') diff --git a/src/map/tmw.cpp b/src/map/tmw.cpp index 9929e59..7afe3ca 100644 --- a/src/map/tmw.cpp +++ b/src/map/tmw.cpp @@ -63,7 +63,7 @@ int tmw_CheckChatSpam(dumb_ptr sd, const char *message) if (tmw_CheckChatLameness(sd, message)) sd->chat_lines_in += battle_config.chat_lame_penalty; - strncpy(sd->chat_lastmsg, message, battle_config.chat_maxline); + strzcpy(sd->chat_lastmsg, message, battle_config.chat_maxline); if (sd->chat_lines_in >= battle_config.chat_spam_flood || sd->chat_total_repeats >= battle_config.chat_spam_flood) -- cgit v1.2.3-60-g2f50