UnrealLoader: replace sprintf by snprintf.

pull/749/head
Kim Kulling 2016-01-04 20:22:46 +01:00
parent 847644ca75
commit f4d3d15bbb
1 changed files with 2 additions and 2 deletions

View File

@ -377,7 +377,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
aiColor3D color(1.f,1.f,1.f); aiColor3D color(1.f,1.f,1.f);
aiString s; aiString s;
::sprintf(s.data,"mat%u_tx%u_",i,materials[i].tex); ::sprintf( s.data, MAXLEN, "mat%u_tx%u_",i,materials[i].tex );
// set the two-sided flag // set the two-sided flag
if (materials[i].type == Unreal::MF_NORMAL_TS) { if (materials[i].type == Unreal::MF_NORMAL_TS) {
@ -397,7 +397,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
// a special name for the weapon attachment point // a special name for the weapon attachment point
if (materials[i].type == Unreal::MF_WEAPON_PLACEHOLDER) { if (materials[i].type == Unreal::MF_WEAPON_PLACEHOLDER) {
s.length = ::sprintf(s.data,"$WeaponTag$"); s.length = ::snprintf( s.data, MAXLEN, "$WeaponTag$" );
color = aiColor3D(0.f,0.f,0.f); color = aiColor3D(0.f,0.f,0.f);
} }