From 2fe8317103038caae42a8c77905b71d9234cb30e Mon Sep 17 00:00:00 2001 From: mazmazz Date: Mon, 24 Dec 2018 18:37:54 -0500 Subject: [PATCH] Fix gcc 8 compile by using strcpy instead of memcpy for PM --- src/hu_stuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 52dc4a7a0..01a19ff32 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -506,7 +506,7 @@ static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags) } buf[0] = target; newmsg = msg+5+spc; - memcpy(msg, newmsg, 252); + strlcpy(msg, newmsg, 252); } SendNetXCmd(XD_SAY, buf, strlen(msg) + 1 + msg-buf); @@ -1014,7 +1014,7 @@ static void HU_queueChatChar(INT32 c) } // we need to get rid of the /pm newmsg = msg+5+spc; - memcpy(msg, newmsg, 255); + strlcpy(msg, newmsg, 255); } if (ci > 3) // don't send target+flags+empty message. {