From 905b6f3855e83d6d511bc350b46a5f5726618aa1 Mon Sep 17 00:00:00 2001 From: thilo Date: Tue, 25 Mar 2008 22:06:08 +0000 Subject: strcpy -> memmove as string does overlap which should be avoided according to the manpage. Thanks to Jacques Boscq. git-svn-id: svn://svn.icculus.org/quake3/trunk@1280 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/qcommon/q_shared.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'code/qcommon') diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c index 5ce6bbf..18b71d3 100644 --- a/code/qcommon/q_shared.c +++ b/code/qcommon/q_shared.c @@ -1143,7 +1143,8 @@ void Info_RemoveKey( char *s, const char *key ) { if (!strcmp (key, pkey) ) { - strcpy (start, s); // remove this part + memmove(start, s, strlen(s) + 1); // remove this part + return; } -- cgit v1.2.3