From 2568bad3cc1ae70350f5ad31e97b4c13194e437e Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 1 Feb 2012 13:43:47 +0000 Subject: sprintf() begone! Replaced with StringUtils' Printf() git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunkLoader.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/cChunkLoader.cpp') diff --git a/source/cChunkLoader.cpp b/source/cChunkLoader.cpp index 94ce6153d..41d61cfaf 100644 --- a/source/cChunkLoader.cpp +++ b/source/cChunkLoader.cpp @@ -105,8 +105,8 @@ bool cChunkLoader::SaveChunk( const cChunk & a_Chunk ) cChunk* cChunkLoader::LoadOldFormat( int a_X, int a_Y, int a_Z ) { - char SourceFile[128]; - sprintf_s(SourceFile, 128, "world/X%i_Y%i_Z%i.bin", a_X, a_Y, a_Z ); + AString SourceFile; + Printf(SourceFile, "world/X%i_Y%i_Z%i.bin", a_X, a_Y, a_Z ); FILE* f = 0; #ifdef _WIN32 @@ -181,10 +181,10 @@ cChunk* cChunkLoader::LoadOldFormat( int a_X, int a_Y, int a_Z ) bool cChunkLoader::SaveOldFormat( const cChunk & a_Chunk ) { - char SourceFile[128]; - sprintf_s(SourceFile, 128, "world/X%i_Y%i_Z%i.bin", a_Chunk.m_PosX, a_Chunk.m_PosY, a_Chunk.m_PosZ ); + AString SourceFile; + Printf(SourceFile, "world/X%i_Y%i_Z%i.bin", a_Chunk.m_PosX, a_Chunk.m_PosY, a_Chunk.m_PosZ ); - #ifdef _WIN32 + #ifdef _WIN32 { SECURITY_ATTRIBUTES Attrib; Attrib.nLength = sizeof(SECURITY_ATTRIBUTES); @@ -310,8 +310,8 @@ cChunk* cChunkLoader::LoadFormat1( int a_X, int a_Y, int a_Z ) cChunkLoader::ChunkPack* cChunkLoader::LoadPak1( int PakX, int PakY, int PakZ ) { - char SourceFile[128]; - sprintf_s(SourceFile, 128, "world/X%i_Y%i_Z%i.pak", PakX, PakY, PakZ ); + AString SourceFile; + Printf(SourceFile, "world/X%i_Y%i_Z%i.pak", PakX, PakY, PakZ ); FILE* f = 0; #ifdef _WIN32 -- cgit v1.2.3