1. Eke ekeeke
  2. Untitled project
  3. Genesis Plus GX
  4. Pull requests

[Core] When copying backward, use memmove instead of memcpy.

#2 · Created  · Last updated

Merged pull request

Merged in anjbe/genesis-plus-gx/memmove (pull request #2)

  • dc131f1
  • Author:
  • Closed by:
  • 2016-08-29

memcpy's behavior when copying between two overlapping buffers is undefined. This is bad. For example, on OpenBSD, such copies abort the program.

memmove acts just like memcpy in almost every way, except copies between two overlapping buffers explicitly succeed. Thus it should be used here.

0 attachments


Loading commits...