Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use memmove in tic_api_memcpy #2417

Merged
merged 1 commit into from
Dec 26, 2023
Merged

Use memmove in tic_api_memcpy #2417

merged 1 commit into from
Dec 26, 2023

Conversation

mbikovitsky
Copy link
Contributor

Calling memcpy with overlapping source and destination buffers is undefined behaviour. For example, see #1875. But, users of the TIC-80 memcpy function probably expect it to work fine even with overlapping buffers. Thus: memmove.

Copy link
Collaborator

@joshgoebel joshgoebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://stackoverflow.com/a/53486461

Looks like a positive change to me.

@nesbox nesbox linked an issue Dec 26, 2023 that may be closed by this pull request
@nesbox nesbox merged commit a3132cb into nesbox:main Dec 26, 2023
20 of 21 checks passed
@mbikovitsky mbikovitsky deleted the patch-1 branch December 26, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

memcpy glitches out in the web build
3 participants