Draft: Update init of aiString (#5623)
* Draft: Update init of aiString - closes https://github.com/assimp/assimp/issues/5622 * Update types.h * Fix typo * Fix another typo * Adapt usage of AI_MAXLEN * Fix compare operator * Add missing renames
This commit is contained in:
@@ -589,12 +589,12 @@ void SMDImporter::CreateOutputMaterials() {
|
||||
pScene->mMaterials[iMat] = pcMat;
|
||||
|
||||
aiString szName;
|
||||
szName.length = static_cast<ai_uint32>(ai_snprintf(szName.data,MAXLEN,"Texture_%u",iMat));
|
||||
szName.length = static_cast<ai_uint32>(ai_snprintf(szName.data, AI_MAXLEN, "Texture_%u", iMat));
|
||||
pcMat->AddProperty(&szName,AI_MATKEY_NAME);
|
||||
|
||||
if (aszTextures[iMat].length())
|
||||
{
|
||||
::strncpy(szName.data, aszTextures[iMat].c_str(),MAXLEN-1);
|
||||
::strncpy(szName.data, aszTextures[iMat].c_str(), AI_MAXLEN - 1);
|
||||
szName.length = static_cast<ai_uint32>( aszTextures[iMat].length() );
|
||||
pcMat->AddProperty(&szName,AI_MATKEY_TEXTURE_DIFFUSE(0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user