strcpy -> memmove as string does overlap which should be avoided according to the manpage. Thanks to Jacques Boscq.

This commit is contained in:
Thilo Schulz 2008-03-25 22:06:08 +00:00
parent 11d9608fca
commit 0ea4387270
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}