-
Notifications
You must be signed in to change notification settings - Fork 260
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
cute_aseprite Crash on tags user data #377
Comments
Send a PR? Looks like it likely should be set. |
KasumiArai
added a commit
to KasumiArai/cute_headers
that referenced
this issue
May 25, 2024
The line ase_tag_t tag; does not initialize tag.udata resulting in that uninitialized data getting copied when ase->tags[k] = tag; is hit. The ase->tags array is initialized to 0 on line 930, so by working directly with the array, instead of copying from the temp tag variable, the user data flags for the tag will remain 0.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Making an issue before a pull request in case I'm misunderstanding something.
Here a new tag is created but its user data is not initialized: https://github.com/RandyGaul/cute_headers/blob/master/cute_aseprite.h#L1100
Which should mean the uninitialized user data (like has_text) is random. The crash I was having was because the "has_text" field was "true" due to a random non zero value, which led to a crash when actually checking the text field which was NULL.
(Sorry for the edit to the issue, I accidentally pressed shift+enter, creating the issue before I was finished.)
The text was updated successfully, but these errors were encountered: