sprintf to snprintf with known MAXLEN for buffer.
parent
7eadcebc9f
commit
25f0146f44
|
@ -68,7 +68,7 @@ void AddNodes(unsigned int num, aiNode *father, unsigned int depth) {
|
||||||
for (unsigned int i = 0; i < 5; ++i) {
|
for (unsigned int i = 0; i < 5; ++i) {
|
||||||
aiNode *nd = father->mChildren[i] = new aiNode();
|
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
|
// spawn two meshes
|
||||||
nd->mMeshes = new unsigned int[nd->mNumMeshes = 2];
|
nd->mMeshes = new unsigned int[nd->mNumMeshes = 2];
|
||||||
|
|
Loading…
Reference in New Issue