kstenerud / Musashi

Motorola 680x0 emulator written in C
427 stars 96 forks source link

Use memmove instead of memcpy when the buffer pointers overlap #46

Closed philpem closed 4 years ago

philpem commented 4 years ago

On some architectures, memcpy uses optimisations which break when the buffer pointers overlap. Where buffers overlap, memmove should be used instead.