0
0
Fork 0
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:
Jilles Tjoelker 2010-03-05 22:05:15 +01:00
parent 431a1a2784
commit f54e1a8fd6

View file

@ -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)