MDCLoader: Replace min and strlen with strnlen
parent
65ffeaa81e
commit
0cf772a4d4
|
@ -294,8 +294,8 @@ void MDCImporter::InternReadFile(
|
||||||
pcMesh->mMaterialIndex = (unsigned int)aszShaders.size();
|
pcMesh->mMaterialIndex = (unsigned int)aszShaders.size();
|
||||||
|
|
||||||
// create a new shader
|
// create a new shader
|
||||||
aszShaders.push_back(std::string( pcShader->ucName, std::min(
|
aszShaders.push_back(std::string( pcShader->ucName,
|
||||||
::strlen(pcShader->ucName),sizeof(pcShader->ucName)) ));
|
::strnlen(pcShader->ucName, sizeof(pcShader->ucName)) ));
|
||||||
}
|
}
|
||||||
// need to create a default material
|
// need to create a default material
|
||||||
else if (UINT_MAX == iDefaultMatIndex)
|
else if (UINT_MAX == iDefaultMatIndex)
|
||||||
|
|
Loading…
Reference in New Issue