strcpy -> memmove as string does overlap which should be avoided according to the manpage. Thanks to Jacques Boscq.
This commit is contained in:
1 parent
11d9608fca
commit
0ea4387270
1 file changed
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user