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

Adding out-of-range guard to plotChar+ functions #636

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

flend
Copy link
Collaborator

@flend flend commented Dec 9, 2023

Previously getInputTextString in debug builds would overwrite the edge of the displayBuffer due to the use of plotCharWithColor. This happened, for example, when printing the default save file name for debug builds (which have long version strings).
This change adds guarding to the plotCharWithColor and plotCharToBuffer (which was already there but only as an assert for debug builds). I haven't changed plotChar since it's a lower level function where the caller will have to take responsibility for not writing outside of bounds.

@tmewett tmewett merged commit 0572e07 into tmewett:release Dec 21, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants