diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-06-25 11:07:16 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-06-25 11:07:16 +0200 |
commit | bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7 (patch) | |
tree | 985a2b8e904e08ed2288abb42c3421075b89cec6 /src | |
parent | Fix cBlockArea null deref (diff) | |
download | cuberite-bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7.tar cuberite-bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7.tar.gz cuberite-bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7.tar.bz2 cuberite-bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7.tar.lz cuberite-bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7.tar.xz cuberite-bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7.tar.zst cuberite-bd025e2bdbaf86425b1d692ffc4aa87c3c086cc7.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/BlockArea.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index 53d82a106..cec113936 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -507,7 +507,7 @@ bool cBlockArea::Read(cForEachChunkProvider & a_ForEachChunkProvider, int a_MinB ASSERT(cChunkDef::IsValidHeight(a_MinBlockY)); ASSERT(cChunkDef::IsValidHeight(a_MaxBlockY)); ASSERT(a_MinBlockX <= a_MaxBlockX); - ASSERT(a_MinBlockY <= a_MaxBlockX); + ASSERT(a_MinBlockY <= a_MaxBlockY); ASSERT(a_MinBlockZ <= a_MaxBlockZ); // Include the Max coords: @@ -3020,7 +3020,7 @@ void cBlockArea::cChunkReader::BlockEntity(cBlockEntity * a_BlockEntity) auto areaX = a_BlockEntity->GetPosX() - m_Area.m_Origin.x; auto areaY = a_BlockEntity->GetPosY() - m_Area.m_Origin.y; auto areaZ = a_BlockEntity->GetPosZ() - m_Area.m_Origin.z; - int Idx = cChunkDef::MakeIndex(areaX, areaY, areaZ); + int Idx = m_Area.MakeIndex(areaX, areaY, areaZ); m_Area.m_BlockEntities->insert({Idx, a_BlockEntity->Clone(areaX, areaY, areaZ)}); } |