Merge pull request #4852 from sfjohnston/sfjohnston_mods

sprintf to snprintf with known MAXLEN for buffer.
pull/4858/head
Kim Kulling 2022-12-31 15:29:24 +01:00 committed by GitHub
commit 05279f8bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ void AddNodes(unsigned int num, aiNode *father, unsigned int depth) {
for (unsigned int i = 0; i < 5; ++i) {
aiNode *nd = father->mChildren[i] = new aiNode();
nd->mName.length = sprintf(nd->mName.data, "%i%i", depth, i);
nd->mName.length = snprintf(nd->mName.data, MAXLEN, "%i%i", depth, i);
// spawn two meshes
nd->mMeshes = new unsigned int[nd->mNumMeshes = 2];