(ef_write): Don't memcpy() onto itself; behavior's undefined.

This commit is contained in:
Markus Armbruster 2005-11-19 15:41:37 +00:00
parent fe1a3e57c6
commit 661b650c1a

View file

@ -359,6 +359,7 @@ ef_write(int type, int id, void *from)
if (id >= ep->baseid && id < ep->baseid + ep->cids) {
/* update the cache if necessary */
to = ep->cache + (id - ep->baseid) * ep->size;
if (to != from)
memcpy(to, from, ep->size);
}
if (id >= ep->fids) {