diff options
author | madmaxoft <github@xoft.cz> | 2014-05-01 22:44:52 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-05-01 22:44:52 +0200 |
commit | a91129af4ac186eaceb5fbf044539c052c4c6cf8 (patch) | |
tree | 378b94adf4354f01e305d38b2717adcff927428f /src/BlockArea.cpp | |
parent | Fixed warnings in FastNBT. (diff) | |
download | cuberite-a91129af4ac186eaceb5fbf044539c052c4c6cf8.tar cuberite-a91129af4ac186eaceb5fbf044539c052c4c6cf8.tar.gz cuberite-a91129af4ac186eaceb5fbf044539c052c4c6cf8.tar.bz2 cuberite-a91129af4ac186eaceb5fbf044539c052c4c6cf8.tar.lz cuberite-a91129af4ac186eaceb5fbf044539c052c4c6cf8.tar.xz cuberite-a91129af4ac186eaceb5fbf044539c052c4c6cf8.tar.zst cuberite-a91129af4ac186eaceb5fbf044539c052c4c6cf8.zip |
Diffstat (limited to 'src/BlockArea.cpp')
-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 55e8d6849..e0ae2c5b6 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -2005,7 +2005,7 @@ void cBlockArea::ExpandBlockTypes(int a_SubMinX, int a_AddMaxX, int a_SubMinY, i int NewSizeX = m_Size.x + a_SubMinX + a_AddMaxX; int NewSizeY = m_Size.y + a_SubMinY + a_AddMaxY; int NewSizeZ = m_Size.z + a_SubMinZ + a_AddMaxZ; - size_t BlockCount = (size_t)NewSizeX * NewSizeY * NewSizeZ; + size_t BlockCount = (size_t)(NewSizeX * NewSizeY * NewSizeZ); BLOCKTYPE * NewBlockTypes = new BLOCKTYPE[BlockCount]; memset(NewBlockTypes, 0, BlockCount * sizeof(BLOCKTYPE)); int OldIndex = 0; @@ -2035,7 +2035,7 @@ void cBlockArea::ExpandNibbles(NIBBLEARRAY & a_Array, int a_SubMinX, int a_AddMa int NewSizeX = m_Size.x + a_SubMinX + a_AddMaxX; int NewSizeY = m_Size.y + a_SubMinY + a_AddMaxY; int NewSizeZ = m_Size.z + a_SubMinZ + a_AddMaxZ; - size_t BlockCount = (size_t)NewSizeX * NewSizeY * NewSizeZ; + size_t BlockCount = (size_t)(NewSizeX * NewSizeY * NewSizeZ); NIBBLETYPE * NewNibbles = new NIBBLETYPE[BlockCount]; memset(NewNibbles, 0, BlockCount * sizeof(NIBBLETYPE)); int OldIndex = 0; |