-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Store GLTF model animation names #3044
Conversation
A small note about |
Thanks for the tip. What I did was copy how it is already done for the bone names https://github.com/raysan5/raylib/blob/master/src/rmodels.c#L4735 which also does not close the bone name as a null terminated string: So shouldn't then the null be added to both places? |
I think it should be added because |
I am fond of char *pVCrayVer = getenv("VCRAYVER");
if (pVCrayVer == NULL)
pVCrayVer = "unidentified version";
char verstring[LINE_MAX+1] = { '\0' };
strncat_s( verstring, LINE_MAX,
pVCrayVer, _TRUNCATE);
// capturing VCRAYVER
Efficiency isn't important in this particular code. and the technique is handy for building lines of text for display. char line2[LINE_MAX+1] = { '\0' };
strncat_s( line2, LINE_MAX,
"Using raylib ", _TRUNCATE);
strncat_s( line2, LINE_MAX,
verstring, _TRUNCATE); More than needed here, but it helps avoid length errors and over-writing a terminating |
a884d7e
to
9cfcb7e
Compare
@hanaxar @orcmid so I'm a bit confused due to code conventions/style, as I haven't contributed to raylib before. What approach should I go then? For now, I force-pushed with @hanaxar tip https://github.com/raysan5/raylib/pull/3044/files#diff-6cc7e70947ba59c1411280dbc0316d4025327b9050db405c56ffb3ddc9555f75R5383 |
@alfredbaudisch I'm merging current improvement. I will review |
strncpy can be replaced by memcpy here, with change in behavior. |
Maybe a new function in EDIT: I was about to open a new PR about it, but then I noticed everything will be dependent on |
Why?