sprintf replacement: introduce au_snprintf to support snprintf for v2013

and earier ( closes https://github.com/assimp/assimp/issues/743 )
This commit is contained in:
Kim Kulling
2016-01-06 15:35:25 +01:00
parent 67c258e75d
commit 6bfdeb6a12
44 changed files with 208 additions and 97 deletions

View File

@@ -377,7 +377,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
aiColor3D color(1.f,1.f,1.f);
aiString s;
::snprintf( s.data, MAXLEN, "mat%u_tx%u_",i,materials[i].tex );
::ai_snprintf( s.data, MAXLEN, "mat%u_tx%u_",i,materials[i].tex );
// set the two-sided flag
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
if (materials[i].type == Unreal::MF_WEAPON_PLACEHOLDER) {
s.length = ::snprintf( s.data, MAXLEN, "$WeaponTag$" );
s.length = ::ai_snprintf( s.data, MAXLEN, "$WeaponTag$" );
color = aiColor3D(0.f,0.f,0.f);
}