diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2014-10-20 19:36:16 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2014-10-20 19:36:16 +0200 |
commit | 48470c858b41f4e951a2f5b4f28dce3107a2911f (patch) | |
tree | 3446b39131dfae7f61bc0e8a5863f1471f99f96f /src | |
parent | Fixed a potential crash in cEntity bindings. (diff) | |
download | cuberite-48470c858b41f4e951a2f5b4f28dce3107a2911f.tar cuberite-48470c858b41f4e951a2f5b4f28dce3107a2911f.tar.gz cuberite-48470c858b41f4e951a2f5b4f28dce3107a2911f.tar.bz2 cuberite-48470c858b41f4e951a2f5b4f28dce3107a2911f.tar.lz cuberite-48470c858b41f4e951a2f5b4f28dce3107a2911f.tar.xz cuberite-48470c858b41f4e951a2f5b4f28dce3107a2911f.tar.zst cuberite-48470c858b41f4e951a2f5b4f28dce3107a2911f.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Generating/ChunkDesc.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Generating/ChunkDesc.cpp b/src/Generating/ChunkDesc.cpp index c0b646fd0..566332b1f 100644 --- a/src/Generating/ChunkDesc.cpp +++ b/src/Generating/ChunkDesc.cpp @@ -269,10 +269,10 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX LOGWARNING("%s: MaxRelX less than zero, adjusting to zero", __FUNCTION__); a_MaxRelX = 0; } - else if (a_MaxRelX >= cChunkDef::Width) + else if (a_MaxRelX > cChunkDef::Width) { LOGWARNING("%s: MaxRelX more than chunk width, adjusting to chunk width", __FUNCTION__); - a_MaxRelX = cChunkDef::Width - 1; + a_MaxRelX = cChunkDef::Width; } if (a_MinRelY < 0) @@ -290,10 +290,10 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX LOGWARNING("%s: MaxRelY less than zero, adjusting to zero", __FUNCTION__); a_MaxRelY = 0; } - else if (a_MaxRelY >= cChunkDef::Height) + else if (a_MaxRelY > cChunkDef::Height) { LOGWARNING("%s: MaxRelY more than chunk height, adjusting to chunk height", __FUNCTION__); - a_MaxRelY = cChunkDef::Height - 1; + a_MaxRelY = cChunkDef::Height; } if (a_MinRelZ < 0) @@ -311,10 +311,10 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX LOGWARNING("%s: MaxRelZ less than zero, adjusting to zero", __FUNCTION__); a_MaxRelZ = 0; } - else if (a_MaxRelZ >= cChunkDef::Width) + else if (a_MaxRelZ > cChunkDef::Width) { LOGWARNING("%s: MaxRelZ more than chunk width, adjusting to chunk width", __FUNCTION__); - a_MaxRelZ = cChunkDef::Width - 1; + a_MaxRelZ = cChunkDef::Width; } // Prepare the block area: |