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/cChunk.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/cChunk.cpp') diff --git a/source/cChunk.cpp b/source/cChunk.cpp index 992a4e71a..83f7a0ffc 100644 --- a/source/cChunk.cpp +++ b/source/cChunk.cpp @@ -899,8 +899,8 @@ cBlockEntity* cChunk::GetBlockEntity( int a_X, int a_Y, int a_Z ) /// Loads the chunk from the old-format disk file, erases the file afterwards. Returns true if successful bool cChunk::LoadFromDisk() { - char SourceFile[128]; - sprintf_s(SourceFile, ARRAYCOUNT(SourceFile), "world/X%i_Y%i_Z%i.bin", m_PosX, m_PosY, m_PosZ ); + AString SourceFile; + Printf(SourceFile, "world/X%i_Y%i_Z%i.bin", m_PosX, m_PosY, m_PosZ ); cFile f; if (!f.Open(SourceFile, cFile::fmRead)) @@ -974,7 +974,7 @@ bool cChunk::LoadFromDisk() f.Close(); // Delete old format file - if (std::remove(SourceFile) != 0) + if (std::remove(SourceFile.c_str()) != 0) { LOGERROR("Could not delete file %s", SourceFile ); } -- cgit v1.2.3