diff options
author | Mattes D <github@xoft.cz> | 2014-02-24 15:21:28 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-02-24 15:21:28 +0100 |
commit | 2deeef3cdfd432854447bb5fec0270a36e5ee881 (patch) | |
tree | 341d2dec13f382f43452c2f9c01e818c293dcba7 /src/WorldStorage | |
parent | Small improvements to boats. (diff) | |
parent | Fixed MCServer not compiling with C++03 compilers (diff) | |
download | cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.gz cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.bz2 cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.lz cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.xz cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.zst cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.zip |
Diffstat (limited to '')
-rw-r--r-- | src/WorldStorage/MapSerializer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/WorldStorage/MapSerializer.cpp b/src/WorldStorage/MapSerializer.cpp index 0bbe71a60..a4a0aab57 100644 --- a/src/WorldStorage/MapSerializer.cpp +++ b/src/WorldStorage/MapSerializer.cpp @@ -112,7 +112,7 @@ void cMapSerializer::SaveMapToNBT(cFastNBTWriter & a_Writer) a_Writer.AddInt("zCenter", m_Map->GetCenterZ()); const cMap::cColorList & Data = m_Map->GetData(); - a_Writer.AddByteArray("colors", (char *) Data.data(), Data.size()); + a_Writer.AddByteArray("colors", (char *) &Data[0], Data.size()); a_Writer.EndCompound(); } @@ -178,7 +178,7 @@ bool cMapSerializer::LoadMapFromNBT(const cParsedNBT & a_NBT) CurrLine = a_NBT.FindChildByName(Data, "colors"); if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_ByteArray)) { - memcpy(m_Map->m_Data.data(), a_NBT.GetData(CurrLine), NumPixels); + memcpy(&m_Map->m_Data[0], a_NBT.GetData(CurrLine), NumPixels); } return true; |