strcpy -> memmove as string does overlap which should be avoided according to the manpage. Thanks to Jacques Boscq.
This commit is contained in:
parent
11d9608fca
commit
0ea4387270
|
|
@ -1143,7 +1143,8 @@ void Info_RemoveKey( char *s, const char *key ) {
|
||||||
|
|
||||||
if (!strcmp (key, pkey) )
|
if (!strcmp (key, pkey) )
|
||||||
{
|
{
|
||||||
strcpy (start, s); // remove this part
|
memmove(start, s, strlen(s) + 1); // remove this part
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user