summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/MapSerializer.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-02-24 14:43:46 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-02-24 14:43:46 +0100
commit9440b61c8c84dcc5b1348505f5e86d59be8a391d (patch)
tree341d2dec13f382f43452c2f9c01e818c293dcba7 /src/WorldStorage/MapSerializer.cpp
parentSmall improvements to boats. (diff)
downloadcuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar
cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.gz
cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.bz2
cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.lz
cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.xz
cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.zst
cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.zip
Diffstat (limited to 'src/WorldStorage/MapSerializer.cpp')
-rw-r--r--src/WorldStorage/MapSerializer.cpp4
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;