diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-01 14:43:47 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-01 14:43:47 +0100 |
commit | 2568bad3cc1ae70350f5ad31e97b4c13194e437e (patch) | |
tree | 31d0713dfe1b4e42c1f17ddae8ea0114c420fc61 /source/cChunkMap.cpp | |
parent | Removed a few duplicate includes (diff) | |
download | cuberite-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 '')
-rw-r--r-- | source/cChunkMap.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp index 8e2257858..92a9b67eb 100644 --- a/source/cChunkMap.cpp +++ b/source/cChunkMap.cpp @@ -455,9 +455,8 @@ void cChunkMap::SaveLayer( cChunkLayer* a_Layer ) std::string WorldName = m_World->GetName();
cMakeDir::MakeDir( WorldName.c_str() );
- char SourceFile[128];
-
- sprintf_s(SourceFile, ARRAYCOUNT(SourceFile), ( WorldName + "/X%i_Z%i.pak").c_str(), a_Layer->m_X, a_Layer->m_Z );
+ AString SourceFile;
+ Printf(SourceFile, "%s/X%i_Z%i.pak", WorldName.c_str(), a_Layer->m_X, a_Layer->m_Z );
cFile f;
if (!f.Open(SourceFile, cFile::fmWrite))
@@ -538,9 +537,9 @@ void cChunkMap::SaveLayer( cChunkLayer* a_Layer ) cChunkMap::cChunkLayer* cChunkMap::LoadLayer(int a_LayerX, int a_LayerZ )
{
std::string WorldName = m_World->GetName();
- char SourceFile[128];
-
- sprintf_s(SourceFile, ARRAYCOUNT(SourceFile), (WorldName + "/X%i_Z%i.pak").c_str(), a_LayerX, a_LayerZ );
+
+ AString SourceFile;
+ Printf(SourceFile, "%s/X%i_Z%i.pak", WorldName.c_str(), a_LayerX, a_LayerZ);
cFile f(SourceFile, cFile::fmRead);
if (!f.IsOpen())
|