summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-01 14:43:47 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-01 14:43:47 +0100
commit2568bad3cc1ae70350f5ad31e97b4c13194e437e (patch)
tree31d0713dfe1b4e42c1f17ddae8ea0114c420fc61 /source/cChunk.cpp
parentRemoved a few duplicate includes (diff)
downloadcuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.gz
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.bz2
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.lz
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.xz
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.zst
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp6
1 files changed, 3 insertions, 3 deletions
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 );
}