Fix aiString length in aiProcess_EmbedTextures

pull/4108/head
Davide Pizzolotto 2021-10-03 00:36:40 +02:00
parent 3e4cca4d2f
commit ae951fbef9
No known key found for this signature in database
GPG Key ID: 19EAAB9170999816
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ void EmbedTexturesProcess::Execute(aiScene* pScene) {
// Indeed embed
if (addTexture(pScene, path.data)) {
auto embeddedTextureId = pScene->mNumTextures - 1u;
::ai_snprintf(path.data, 1024, "*%u", embeddedTextureId);
path.length = ::ai_snprintf(path.data, 1024, "*%u", embeddedTextureId);
material->AddProperty(&path, AI_MATKEY_TEXTURE(tt, texId));
embeddedTexturesCount++;
}