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

@@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "FixNormalsStep.h"
#include "StringUtils.h"
#include "../include/assimp/DefaultLogger.hpp"
#include "../include/assimp/postprocess.h"
#include "../include/assimp/scene.h"
@@ -158,7 +159,7 @@ bool FixInfacingNormalsProcess::ProcessMesh( aiMesh* pcMesh, unsigned int index)
if (!DefaultLogger::isNullLogger())
{
char buffer[128]; // should be sufficiently large
::sprintf(buffer,"Mesh %u: Normals are facing inwards (or the mesh is planar)",index);
ai_snprintf(buffer,128,"Mesh %u: Normals are facing inwards (or the mesh is planar)",index);
DefaultLogger::get()->info(buffer);
}