RandyGaul / cute_headers

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
4.21k stars 264 forks source link

cute_aseprite Crash on tags user data #377

Closed KasumiArai closed 2 months ago

KasumiArai commented 4 months ago

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.)

RobLoach commented 2 months ago

Send a PR? Looks like it likely should be set.