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