mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 00:14:07 +01:00
Use memmove instead of memcpy where there is overlap (modunload).
This commit is contained in:
parent
431a1a2784
commit
f54e1a8fd6
1 changed files with 1 additions and 1 deletions
|
@ -738,7 +738,7 @@ unload_one_module(const char *name, int warn)
|
|||
dlclose(modlist[modindex]->address);
|
||||
|
||||
rb_free(modlist[modindex]->name);
|
||||
memcpy(&modlist[modindex], &modlist[modindex + 1],
|
||||
memmove(&modlist[modindex], &modlist[modindex + 1],
|
||||
sizeof(struct module) * ((num_mods - 1) - modindex));
|
||||
|
||||
if(num_mods != 0)
|
||||
|
|
Loading…
Reference in a new issue